Unable to connect to git hub repo from Dataform gcp

441 views Asked by At

Terraform after creating dataform repositories with the following setting. The repository is created in dataform but unable to access.Getting token as invalid refer the screenshot.

git_remote_settings {
      url = "https://github.com/test-group/**-app.git"
      default_branch = "main"
      authentication_token_secret_version = google_secret_manager_secret_version.secret_version.id
  }

enter image description here

3

There are 3 answers

0
Tom On

GCP's documentation (found here: https://cloud.google.com/dataform/docs/connect-repository) is incorrect. It is not currently possible to use the fine grained personal access tokens with Dataform.

You must use a classic personal access token. You must also provide it the "repo" scope (full control). It won't work unless all of the scopes under repo are enabled.

It should then work. I really wanted to use the fine grained token, but it does not work. It will show you an error about being able to reach the repo URL if you provide the fined grain token as a secret.

0
Nestor On

Can you try adding this role to your service account: Dataform Admin (roles/dataform.admin)

Also for reference please visit this guide.

To get the permissions that you need to link a Dataform repository to a remote Git repository, ask your administrator to grant you the Dataform Admin (roles/dataform.admin) IAM role on repositories. For more information about granting roles, see Manage access.

0
anupam On

The issue was with personal access token. It was not configure to authorized SSO.

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

The steps specified the above link helped.