致命:推送到 Git 存储库时远程端意外挂起
我创建了一个名为 DirectorySocket 的新存储库,并从名为 DirectorySocket 的项目目录中执行了以下操作:
$ git init
$ git add .
$ git remote add origin [email protected]:neilghosh/DirectorySocket.git
$ git commit -m "Initial version"
$ git push origin master
我收到以下错误:
错误:neilghosh/DirectorySocket.git 的权限被拒绝 尼尔戈什/谷歌利。 fatal:远端意外挂断
为什么它试图推送到我在 GitHub 上的另一个存储库? 在我删除 .git 文件夹并重新开始后,也会发生这种情况。
I created a new repository called DirectorySocket, and from my project directory called DirectorySocket I did the following:
$ git init
$ git add .
$ git remote add origin [email protected]:neilghosh/DirectorySocket.git
$ git commit -m "Initial version"
$ git push origin master
And I got the following error:
ERROR: Permission to neilghosh/DirectorySocket.git denied to
neilghosh/googly. fatal: The remote end hung up unexpectedly
Why is it trying to push to another repository of mine on GitHub?
This happens also after I deleted the .git
folder and started over.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
由于它是您的存储库,请检查密钥和令牌是否按照 GitHub 提供的说明正确设置。
http://help.github.com/win-set-up-git/
第一步,看看是否
有效。
Since it is your repository, check if the keys and token are setup properly as per the instructions provided by GitHub.
http://help.github.com/win-set-up-git/
As a first step, see if
works.
这里有一些线索 -这很可能是授权问题。您是否已将公钥上传至 GitHub?
您的网络情况如何?我在限制性的公司防火墙后面得到了这个响应 - 答案是使用智能 HTTP 支持< /a> 现在由 GitHub 支持。
There are a couple of leads here - it is most likely an authorization issue. Have you uploaded your public key to GitHub?
What is your network situation? I get this response behind my restrictive corporate firewall - the answer there is to use the smart HTTP support now supported by GitHub.
此处直接链接到 GitHub 说明:
https://help.github.com/articles/generate- ssh 密钥
Direct link to GitHub explanation here:
https://help.github.com/articles/generating-ssh-keys