将新文件推送到新仓库
Pushing new files to new repo
我正在尝试将一组现有文件推送到我创建的新私人存储库中。我以前做过,但今天我得到的输出与平时不同。
推送后,我收到以下消息:
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/
表示与 bitbucket 的通信将使用 SSH 密钥进行。
你可以做两件事
- 在您的计算机上设置一个 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
我正在尝试将一组现有文件推送到我创建的新私人存储库中。我以前做过,但今天我得到的输出与平时不同。
推送后,我收到以下消息:
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/
表示与 bitbucket 的通信将使用 SSH 密钥进行。
你可以做两件事
- 在您的计算机上设置一个 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