Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/ssh/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
无法使用ssh克隆带有Concourse的git存储库_Git_Ssh_Concourse - Fatal编程技术网

无法使用ssh克隆带有Concourse的git存储库

无法使用ssh克隆带有Concourse的git存储库,git,ssh,concourse,Git,Ssh,Concourse,如前所述,我们正在使用部署到的Concourse实例和使用docker compose的EC2实例 事情基本上进展顺利。但是,我们似乎无法使用SSH克隆git资源。我们得到这个错误: resource script '/opt/resource/check []' failed: exit status 128 stderr: Identity added: /tmp/git-resource-private-key (/tmp/git-resource-private-key) Clonin

如前所述,我们正在使用部署到的Concourse实例和使用docker compose的EC2实例

事情基本上进展顺利。但是,我们似乎无法使用SSH克隆git资源。我们得到这个错误:

resource script '/opt/resource/check []' failed: exit status 128

stderr:
Identity added: /tmp/git-resource-private-key (/tmp/git-resource-private-key)
Cloning into '/tmp/git-resource-repo-cache'...
fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists.
我们过去使用过Concourse,因此我们可以合理地确定资源配置正确,但我也附上了一个示例

- name: vision_build
  type: git
  source:
    private_key: |
      -----BEGIN RSA PRIVATE KEY-----
      ***************************
      -----END RSA PRIVATE KEY-----
    uri: git@github.com:someorg/someapp.git
克隆可以正确地使用用户名/密码身份验证,但我们希望使用只读部署密钥

我们看到的另一个症状是无法劫持我们的工作。目前还不清楚它们是否连接在一起,但考虑到它们都与SSH有关,这似乎是可能的。“劫持”将返回此消息:

error: websocket: bad handshake

将我的评论升级为答案


您的私钥对应的公钥是否在github端的someorg/someapp下配置?是作为部署密钥,还是作为组织中专门从事该活动的用户?听起来好像您没有在github中添加对密钥的访问。

您的私钥是否在github端的
someorg/someapp
下配置了相应的puiblic密钥?是作为部署密钥,还是作为组织中专门从事该活动的用户?听起来好像你没有在github中添加密钥访问权限。谢谢Dan,看起来你可能是对的。我们确实将相应的公钥配置为repo的部署密钥,但似乎我们在这一过程中犯了一个错误。使用相同私钥的本地测试失败。我们将使用已确认的工作私钥重试。我们已验证这些密钥配置正确。事实证明,有一些网络规则阻止通过SSH与外部internet进行通信。我们将在短期内使用https,并将放松一些网络规则作为长期方法。