Git 将新文件推送到新的repo
我正在尝试将一组现有文件推送到我创建的新私有回购协议。我以前做过,但今天我得到的输出与平常不同 一推,我得到了以下信息:Git 将新文件推送到新的repo,git,bitbucket,Git,Bitbucket,我正在尝试将一组现有文件推送到我创建的新私有回购协议。我以前做过,但今天我得到的输出与平常不同 一推,我得到了以下信息: 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
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 git@bitbucket.org: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
问题,我如何解决这个问题?这个git@bitbucket.org/
表示将使用SSH密钥与bitbucket进行通信
你可以做两件事
https/(UserName)@bitbucket.org:renovationlabs/cloudcode.git
。通过这种方式,您可以使用https与bitbucket通信