簡體   English   中英

從Concourse克隆Bitbucket上的git repo的問題

[英]Issues cloning a git repo on Bitbucket from Concourse

因此,我在Bitbucket上有一個git repo,作為Concourse工作的一部分,我需要對其進行監視。 該存儲庫可用,並且我的〜/ .ssh文件夾中具有SSH密鑰,並具有正確的權限(600)。 在我的機器上,我可以運行'git clone git@bitbucket.org:/。git'命令,並成功克隆存儲庫。 但是,當我嘗試將其作為Concourse資源進行監視時,它將失敗。 我究竟做錯了什么? 我是否缺少配置選項?

以下是我的管道,這很基本。


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上看到的是:

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-clone時看到的內容:

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.

您是否已將私鑰用於某種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"

這可能不起作用,因為我遇到類似的問題,但是您可以嘗試使用這種方法

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM