Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Dataform repository SSH connection to GitLab failing

For our Dataform repository, I'm attempting to add an SSH connection to our remote GitLab repository (cloud hosted). I've added a Deploy Key to GitLab and associated the key there. I've also tested the ssh key pair to make sure it can connect successfully to GitLab. I've even cloned the repo with that key.

However, when I configure Dataform to use the private key (stored in Secrets Manager) and setup all the other settings, it fails to connect.

I've ensured the default service account has access to the password version as well. Yet we still get this error:

"We are unable to connect to your Git provider with the configured credentials. If you use HTTPS authentication check that the token is valid and has not expired. If you use SSH authentication check that the private user key and public host key are valid. View docs on connecting a remote git repository. "

Anything else I can try or logs I could look at?

Solved Solved
0 4 3,035
1 ACCEPTED SOLUTION

Thanks @ms4446 for your thoughts on this. That resource type didn't yield any logs.

I figured out the problem though via a different path. When I was looking at the compilation results of my Release Config, they were failing and had better error message:

"The ssh host public key for remote repository 'git@gitlab.com:*****/****.git' didn't match"

This clued me in that we were using the wrong public key. We were using the public key from the SSH key pair we had to generate, not the one that is stored in the known_hosts file when connecting to GitLab.

I wish this error was visible from the SSH connection configuration screen as opposed to the Release Configuration details screen.

It appears that a search expression that will yield dataform repository logs is:

protoPayload.serviceName="dataform.googleapis.com"

View solution in original post

4 REPLIES 4