Git host key verification failed


#1

Been banging my head against this for a while, can’t figure out what I’m missing.

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

Here’s my git resource (yes, I know I shouldn’t have the key in the config. baby steps for now).

- name: hab_mng_tutorial
  type: git
  source:
    uri: git@github.com:{MyGitHubUsername}/{MyRepo}.git
    branch: master
    private-key: |
      -----BEGIN RSA PRIVATE KEY-----
      {PRIVATE KEY DATA}
      -----END RSA PRIVATE KEY-----

I have validated the URI, validated the private key.


#2

It should be private_key instead of private-key :wink:


#3

Haha, got that fixed 2 minutes before you posted.

Weirdly, 5 hours ago I changed it from _ to - and it got me past a different error. And I swear I tried changing it back to _ at some point and it didn’t work, but maybe I had some other error at the time.

Anyway, I’m unstuck, thank you.