GCP Dataform - Can't connect repository to Github via SSH

293 Views Asked by At

I have a working ssh key and when I try to connect Dataform to Github with it, I get the error "We are unable to connect to your Git provider with the configured credentials". There's no other information about the error. If there is, I'm not sure where to look.

What I've done so far:

  1. Created a secret in GCP with the file selection left empty, and set the secret value as the private ssh key like the following:
-----BEGIN OPENSSH PRIVATE KEY-----
private_key
-----END OPENSSH PRIVATE KEY-----
  1. Bound the secret to Dataform repository, and set the "Host public key" value as the following:
ssh-ed25519 public_key comment

I verified that there's no typo in the values I entered. Am I missing something here? Could it be wrong key format?

2

There are 2 best solutions below

0
On BEST ANSWER

I ran into the same issue, the issue was that I was supplying the public key of the GitHub deploy key I generated for my target repository, not the GitHub SSH key fingerprint:

github.com ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCj7ndNxQowgcQnjshcLrqPEiiphnt+VTTvDP6mHBL9j1aNUkY4Ue1gvwnGLVlOhGeYrnZaMgRK6+PKCUXaDbC7qtbW8gIkhL7aGCsOr/C56SJMy/BCZfxd1nWzAOxSDPgVsmerOBYfNqltV9/hWCqBywINIR+5dIg6JTJ72pcEpEjcYgXkE2YEFXV1JHnsKgbLWNlhScqb2UmyRkQyytRLtL+38TGxkxCflmO+5Z8CSSNY7GidjMIZ7Q4zMjA2n1nGrlTDkzwDCsw+wqFPGQA179cnfGWOWRVruj16z6XyvxvjJwbz0wQZ75XK5tKSb7FNyeIEs4TT4jk+S4dhPeAUC5y+bDYirYgM4GC7uEnztnZyaVWQ7B381AK4Qdrwt51ZqExKbQpTUNn+EjqoTwvqNj4kqx5QUCI0ThS/YkOxJCXmPUWZbhjpCg56i+2aB6CmK2JGhn57K5mj0MNdBXA4/WnwH6XoPWJzK5Nyu2zB3nAZp+S5hpQs+p1vN1/wsjk=

The documentation asks for this value in ALGORITHM BASE64_KEY_VALUE format, so I successfully configured the connection with

ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCj7ndNxQowgcQnjshcLrqPEiiphnt+VTTvDP6mHBL9j1aNUkY4Ue1gvwnGLVlOhGeYrnZaMgRK6+PKCUXaDbC7qtbW8gIkhL7aGCsOr/C56SJMy/BCZfxd1nWzAOxSDPgVsmerOBYfNqltV9/hWCqBywINIR+5dIg6JTJ72pcEpEjcYgXkE2YEFXV1JHnsKgbLWNlhScqb2UmyRkQyytRLtL+38TGxkxCflmO+5Z8CSSNY7GidjMIZ7Q4zMjA2n1nGrlTDkzwDCsw+wqFPGQA179cnfGWOWRVruj16z6XyvxvjJwbz0wQZ75XK5tKSb7FNyeIEs4TT4jk+S4dhPeAUC5y+bDYirYgM4GC7uEnztnZyaVWQ7B381AK4Qdrwt51ZqExKbQpTUNn+EjqoTwvqNj4kqx5QUCI0ThS/YkOxJCXmPUWZbhjpCg56i+2aB6CmK2JGhn57K5mj0MNdBXA4/WnwH6XoPWJzK5Nyu2zB3nAZp+S5hpQs+p1vN1/wsjk=
1
On

Looking at the error message, you may want to check the permissions on the private key as it needs to be readable by the Dataform process and verify that it matches the entry on your secret. The public key should also be in place on your GitHub account while the private key should be used for the authentication. Also, it never hurts to check your network and security settings such as firewalls for good measure. Attached is a document that can help your use case.[1]

[1] https://cloud.google.com/dataform/docs/connect-repository