git Visual Studio 2013 GitHub
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/22516048/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Visual Studio 2013 GitHub
提问by Fabio Galante Mans
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. Category = Net (Error). Response status code does not Indicate success: 403 Forbidden).
发生错误。详细消息:libgit2 引发错误。类别 = 净值(错误)。响应状态码不表示成功:403 Forbidden)。
Please someone you idea what it is?
请问有人知道是什么吗?
回答by UUHHIVS
You should use a HTTP debbuging proxy server (i.e. fiddler), and try to synchronize your commit with Visual Studio (Visual Studio Tools for Git extension). 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).
您应该使用 HTTP 调试代理服务器(即 fiddler),并尝试将您的提交与 Visual Studio(Visual Studio Tools for Git 扩展)同步。就我而言,我意识到我使用另一个 git 帐户登录,VS 尝试使用该帐户登录(请求:对用户 X 拒绝 repo/repo.git 的权限)。
So I run 'rundll32.exe keymgr.dll,KRShowKeyMgr' and erase my credentials (maybe only update could works). When I tried to sync again, VS ask for credentials and everything works fine.
所以我运行'rundll32.exe keymgr.dll,KRShowKeyMgr'并清除我的凭据(也许只有更新可以工作)。当我再次尝试同步时,VS 要求提供凭据,一切正常。
回答by MadDev
Check on your local project path the config file allocated in .git folder. It should be something like this:
检查您的本地项目路径,在 .git 文件夹中分配的配置文件。它应该是这样的:
[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. ;)
我希望它能帮助你。;)
回答by Joe Healy
I receive this error typically in a team environment when my team leads 'forgot' to give me rights to the GitHub repos.
当我的团队领导“忘记”授予我对 GitHub 存储库的权利时,我通常会在团队环境中收到此错误。
回答by S. Muhammad H. Mustafa
My one cent:
我的一分钱:
Add your second account as a collaborator to the repository. To add a collaborator, go to repository settings page -> collaborators.
将您的第二个帐户作为协作者添加到存储库。要添加协作者,请转到存储库设置页面 -> 协作者。
回答by vishal vaishnav
I started facing this issue when I changed my bitbucket password.
当我更改我的 bitbucket 密码时,我开始面临这个问题。
So I deleted the Source tree default authentication.
When I tried to sync again, it asked for credentials. After providing new credentials everything started working again.
所以我删除了源树默认身份验证。
当我再次尝试同步时,它要求提供凭据。提供新凭据后,一切又开始工作。