git - Bot与bitbucket集成的问题

标签 git ssh xcode5 bitbucket bots

我正在将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_rsaid_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/

相关文章:

java - 使用 Jsch 的 .keystore 文件中的私有(private) RSA key

ios - 以编程方式获取 iOS7 的 IMEI

Git - 如何将我的本地文件恢复到我最后一次提交?

git - 有什么办法可以在同一个文件夹中有版本化和未版本化的 .gitignore 吗?

Git 子模块工作流问题

python - 只有 pwd 命令在 Paramiko 中成功,其他命令失败并显示 "ksh: ...: cannot execute - No such file or directory"

bash - 为非交互式 shell 获取 .bashrc 的正确方法

git merge --no-commit 在 IntelliJ IDEA 中运行时创建 merge 提交

ios - EXC_BAD_ACCESS SK物理世界

ios - 不支持的编译器 'com.apple.compilers.llvmgcc42' xcode 5 DP