简体   繁体   English

Visual Studio 2013 GitHub

[英]Visual Studio 2013 GitHub

I sync sources to GitHub using Visual Studio 2013 with a particular account, but the following error when trying to come up with another account occurs. 我使用特定帐户使用Visual Studio 2013将源同步到GitHub,但是尝试提供另一个帐户时发生以下错误。

An error occurred. 发生错误。 Detailed message: An error was raised by libgit2. 详细消息:libgit2引发了错误。 Category = Net (Error). 类别=净(错误)。 Response status code does not Indicate success: 403 Forbidden). 响应状态代码不表示成功:“ 403禁止”。

Please someone you idea what it is? 请有人知道这是什么吗?

You should use a HTTP debbuging proxy server (ie fiddler), and try to synchronize your commit with Visual Studio (Visual Studio Tools for Git extension). 您应该使用HTTP调试代理服务器(即fiddler),并尝试将提交与Visual Studio同步(Visual Studio Tools for Git扩展)。 In my case I realized that I was logged with another git account and VS tries to login with that account (Request: Permission to repo/repo.git denied to UserX). 就我而言,我意识到我是用另一个git帐户登录的,而VS尝试使用该帐户登录(请求:UserX拒绝repo / repo.git的权限)。

So I run 'rundll32.exe keymgr.dll,KRShowKeyMgr' and erase my credentials (maybe only update could works). 所以我运行'rundll32.exe keymgr.dll,KRShowKeyMgr'并清除我的凭据(也许只有更新才行)。 When I tried to sync again, VS ask for credentials and everything works fine. 当我尝试再次同步时,VS要求提供凭据,并且一切正常。

Check on your local project path the config file allocated in .git folder. 检查本地项目路径中.git文件夹中分配的配置文件。 It should be something like this: 应该是这样的:

[core]
   bare = false
   repositoryformatversion = 0
   filemode = false
   symlinks = false
   ignorecase = true
   logallrefupdates = true
[remote "origin"]
   url = https://github.com/aGitHubUser/aRepo.git
   fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
   remote = origin
   merge = refs/heads/master

Equally, be sure , that you have permissions on the reopsitory on GitHub web. 同样,请确保您对GitHub Web上的重新访问拥有权限。

I hope that it helps you. 希望对您有帮助。 ;) ;)

当团队领导“忘记”授予我GitHub存储库的权限时,通常会在团队环境中收到此错误。

My one cent: 我的一分钱:

Add your second account as a collaborator to the repository. 将您的第二个帐户作为协作者添加到存储库。 To add a collaborator, go to repository settings page -> collaborators. 要添加协作者,请转至存储库设置页面->协作者。

I started facing this issue when I changed my bitbucket password. 更改位桶密码时,我开始遇到此问题。

So I deleted the Source tree default authentication. 所以我删除了Source树的默认身份验证。
When I tried to sync again, it asked for credentials. 当我尝试再次同步时,它要求提供凭据。 After providing new credentials everything started working again. 提供新的凭据后,所有内容又重新开始工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM