使用gitextensions推送到github时出现Git错误
我在 github 上创建了一个名为 Documentation 的存储库。我认为创建了一个名为 Doc 的本地存储库。
我将一个名为 origin 的远程文件添加到本地 Doc 存储库,并将其指向正确的 github 读写 URI。添加并在本地提交了一个文件,但是当我尝试推送到原点时,我收到以下错误:
git push -u "origin" master:master
Done
ERROR: Permission to myUsername/Documentation.git denied to myUsername.
fatal: The remote end hung up unexpectedly
I can ssh to [电子邮件受保护] 并收到我登录成功的通知。我似乎无法推送到我的存储库。
我可以将存储库克隆到一个新文件夹中,但如果我尝试添加提交并推送新文件,我会收到相同的错误。
I created a repository on github named Documentation. I think created a local repository named Doc.
I added a remote named origin to the local Doc repository and pointed it to the proper github read-write URI. Added and locally committed a file, but when I attempt to push to origin I receive the following error:
git push -u "origin" master:master
Done
ERROR: Permission to myUsername/Documentation.git denied to myUsername.
fatal: The remote end hung up unexpectedly
I can ssh to [email protected] and receive the notice that I logged in successfully. I just can't seem to push to my repository.
I can clone the repository into a new folder, but if I attempt to add commit and push a new file I get the same error.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您将在 此 GitHub 支持线程 您需要对此错误执行的所有检查。
这将包括:
git user.name
git user.email
/home/myuser/.ssh/id_rsa.pub
的内容code> 到 github 的帐户页面。而不在其中粘贴任何空格。
git remote add origin [email protected] :myuser/myrepo.git
.git/config
.该目录是正确的,而不是另一个目录:
ssh [email protected]< /a> -v
使用正确的用户名给出成功的身份验证(任何其他用户名意味着另一个实际上使用了 GitHub 帐户)github 用户名
和github 令牌
:(为系统上的所有 git 实例设置 GitHub 令牌)
- 创建一个
~/.ssh/config
You will find in this GitHub support thread all the checks you need to do with this error.
That would include:
git user.name
git user.email
/home/myuser/.ssh/id_rsa.pub
to github's account page.without pasting any whitespace in it.
git remote add origin [email protected]:myuser/myrepo.git
.git/config
.The directory is correct and not another directory:
ssh [email protected] -v
gives a successful authentication, with the right username (any other username means that another GitHub account is actually used)github username
andgithub token
:(Sets the GitHub token for all git instances on the system)
- create a
~/.ssh/config