我正在将ssh与bitbucket集成到bot中。
我已经按照文档中所述完成了所有步骤,生成ssh将其复制到bitbucket上。
但是我在集成bot时总是不断出现以下错误:
debug1: Roaming not allowed by server,
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
我尝试了这个:
ssh -T git@bitbucket.org
在终端上并得到以下输出:
logged in as my UserName.
You can use git or hg to connect to Bitbucket. Shell access is disabled.
您将如何解决该问题?
最佳答案
通常,这是因为您的bot与您使用ssh命令测试的帐户使用的帐户不同。
确保机器人在其~/.ssh
下具有id_rsa
和id_rsa.pub
(后者已复制到您的BitBucket帐户中,这是正确的,因为ssh -T git@bitbucket.org
在终端上可用)。
还要检查该.ssh
文件夹及其文件的权限(再次使用该漫游器使用的正确帐户),如“[Git SSH authentication][1]
”中所述。
OP rtk123确认in the comments:
I was using wrong ssh key with bot on mac osx server: I didn't add ssh key to server repository.
关于git - Bot与bitbucket集成的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20825663/