首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >从cloning克隆Bitbucket上的git回购的问题

从cloning克隆Bitbucket上的git回购的问题
EN

Stack Overflow用户
提问于 2019-01-17 19:56:49
回答 1查看 923关注 0票数 0

因此,我在Bitbucket上有一个git,我需要将它作为Concourse工作的一部分来监控。回购是可用的,我的~/.ssh文件夹中有SSH密钥,具有正确的权限(600)。在我的机器上,我可以运行'git克隆git@bitbucket.org:/.git‘命令,并成功地复制repo。但是,当我试图将它作为Concourse资源进行监视时,它会失败。我做错了什么?我缺少配置选项了吗?

下面是我的管道,它是相当基本的。

代码语言:javascript
复制
resources:
- name: dc
  type: git
  source:
    branch: master
    uri: git@bitbucket.org:<company>/<repo>.git


jobs:
- name: Build-docker
  plan:
  - get: dc
    trigger: true
  - task: build-image
    config:
      platform: linux
      image_resource:
        type: docker-image
        source:
        repository: ubuntu

     run:
        path: uname
        args: ['r']

我在GUI上看到的是:

代码语言:javascript
复制
stderr:
Cloning into '/tmp/git-resource-repo-cache'...
Host key verification failed.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

当我在本地运行git-克隆时所看到的:

代码语言:javascript
复制
git clone git@bitbucket.org:<company>/<repo>.git
Cloning into 'repo'...
Warning: Permanently added the RSA host key for IP address '18.205.93.1' to the list of known hosts.
remote: Counting objects: 50985, done.
remote: Compressing objects: 100% (26500/26500), done.
Receiving objects: 100% (50985/50985), 6.65 MiB | 11.19 MiB/s, done.
remote: Total 50985 (delta 39577), reused 31398 (delta 24283)
Resolving deltas: 100% (39577/39577), done.
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-01-24 10:57:53

您是否将私钥输入到某种secrets.yml文件中?然后在你设置管道的时候把它装上?例如:

resources: - name: dc type: git source: branch: master uri: git@bitbucket.org:<company>/<repo>.git private_key: ((private_key))

那就试试

fly -t "org" set-pipeline -p "pipeline_name" -c "pipeline.yml file name" --load-vars-from "secrets_file.yml"

这可能行不通,因为我也有类似的问题,但你可以试试这条路

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/54243392

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档