Skip to content

Host key verification failed. fatal: Could not read from remote repository #200

@akamalov

Description

@akamalov

Greetings,

Environment:

pcf-pipelines-maestro: latest
Concourse: 3.14.0

Trying to clone from a local repository in Bitbucket. Using SSH public/private keys generated for this project. Public key has been uploaded to a repository Access Keys and I can confirm that using command line this key works:

$ ssh-agent bash -c 'ssh-add ./privkey; git clone ssh://git@bitbucket.XXXXXX.localnet/cf/pcf-pipelines-maestro.git'
Identity added: ./privkey (./privkey)
Cloning into 'pcf-pipelines-maestro'...
remote: Counting objects: 129, done.
remote: Compressing objects: 100% (94/94), done.
remote: Total 129 (delta 29), reused 129 (delta 29)
Receiving objects: 100% (129/129), 1.38 MiB | 3.08 MiB/s, done.
Resolving deltas: 100% (29/29), done.

My file containing credentials has SSH private-key embedded:

# This file contains common configuration parameters and credentials for all
# PCF foundations and which are required for creating the main Maestro pipeline.

# ===========================================================================
# ======== SECTION A - Maestro main pipeline params =========================
# ===========================================================================

# The url of the git project containing the maestro configuration and script files
maestro_project_url: ssh://git@bitbucket.XXXXXXX.localnet/cf/pcf-pipelines-maestro.git
#maestro_project_url: https://github.com/pivotalservices/pcf-pipelines-maestro.git
# Private Key for access to pcf-pipelines project when applicable.
git_maestro_private_key: |
  -----BEGIN RSA PRIVATE KEY-----
  MIIJKAIBAAKCAgEAqjkm2qzaeuilGcyplP093gbkxFoh+pwoeck1nJuLqIRzVG9L
  LXAfVsZH1YlfOD9BeURq5i+LziwW5JCBLqHhWxkETZXH6D22QuIMo/OvGxePamfe
  I2G1kTyYYjld+XAU+gJPFZBj+tata3233vs3MqFln2RppvFC9Z2sdCEIfYHH7Zwp
...

However, my pipeline errors out:

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

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.

What could be happening here ? Any clues or ways to troubleshoot ?

Thanks so much!!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions