我正在尝试使用我的GitHub ssh密钥之一,以便可以从推入和拉出oranization/repo
。我刚刚创建了密钥并将其添加到我自己的帐户中。我按照GitHub生成SSH密钥页面上的所有说明进行操作。
GitHub ssh在我做的时候就认出我 ssh -T [email protected]
但是,当我尝试拉取或克隆时,GitHub仍然要求我提供用户名/密码。我有权修改此存储库。
(vagrant)vagrant@vagrant-ubuntu-trusty-32:/vagrant$ ssh -T [email protected]
Warning: Permanently added the RSA host key for IP address '192.30.252.130' to the list of known hosts.
Hi getvictor! You've successfully authenticated, but GitHub does not provide shell access.
(vagrant)vagrant@vagrant-ubuntu-trusty-32:/vagrant$ git pull
Username for 'https://github.com':
任何想法如何解决?
检查origin
回购的远程“ ”:
git remote -v
如果它包含https,则您的ssh密钥将无关紧要,因为它是一个https URL,而不是ssh。
您可以使用以下命令将其更改为ssh:
git remote set-url origin [email protected]:USERNAME/REPOSITORY2.git
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句