【发布时间】:2013-03-07 00:19:04
【问题描述】:
早安,
我有一个非常奇怪的问题,有人在 github 中将我添加为他组织的成员,并要求我提供 rsa 密钥,我现在是该组织的成员,但现在我的所有其他项目在进行推送时指向该组织的回购,即:
for_linode $ git push origin master
ERROR: Permission to jlstr/for_linode.git denied to other_org/core.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
当我打印我的远程源配置时,它会显示正确的信息:
for_linode $ git remote show origin
* remote origin
Fetch URL: git@github.com:jlstr/for_linode.git
Push URL: git@github.com:jlstr/for_linode.git
HEAD branch: master
Remote branch:
master tracked
Local branch configured for 'git pull':
master merges with remote master
Local ref configured for 'git push':
master pushes to master (fast-forwardable)
为什么要推送到 other_org/core 存储库?我从来没有见过像这样奇怪的事情,我真的希望有人能帮助我解决这个奇怪的问题.. :(
提前致谢,
何塞。
编辑:
for_linode $ git remote -v
origin git@github.com:jlstr/for_linode.git (fetch)
origin git@github.com:jlstr/for_linode.git (push)
编辑:
for_linode $ ssh -T git@github.com
Hi new_org/core! You've successfully authenticated, but GitHub does not provide shell access.
【问题讨论】:
-
git remote -v返回什么? -
@iberbeu 您好,感谢您的回复,我已将该命令的结果作为编辑添加到原始问题中。
-
他们为什么要 rsa 密钥?您只需将您的 github 用户添加到组织中即可。
-
嗯,密钥也是用来访问VPS服务器的。虽然这是真的,但我假设他将我生成的公钥添加到 github Repo 以授予我推/拉权限。不过不确定是否需要。