我正在尝试将一组现有文件推送到我创建的新私有仓库中。我之前已经做过,但是今天我得到的输出不同于平常。
推送后,我收到以下消息:
Warning: Permanently added the RSA host key for IP address '131.103.20.168' to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
首先,我注意到设置新存储库的说明已改为使用,SSH
而不是HTTPS
推送到存储库:
cd /path/to/my/repo
git remote add origin [email protected]:renovationlabs/cloudcode.git
git push -u origin --all # pushes up the repo and its refs for the first time
git push -u origin --tags # pushes up any tags
现在我遇到了这些警告和错误。这是一个SSH
问题,我该如何解决?
这[email protected]/
意味着将使用SSH密钥与bitbucket进行通信。
你可以做两件事
https//(UserName)@bitbucket.org:renovationlabs/cloudcode.git
。这样,您可以将https与bitbucket进行通信。Bitbucket在这里说明如何设置ssh密钥:
https://confluence.atlassian.com/bitbucket/set-up-ssh-for-git-728138079.html
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句