crossplane-contrib / provider-terraform

A @crossplane provider for Terraform
Apache License 2.0
94 stars 28 forks source link

Support for SSH based private repositories #30

Open vglafirov opened 2 years ago

vglafirov commented 2 years ago

Currently it's possible to specify .git-credentials file for cloning private repositories using HTTPS but not SSH. Also if module contain references to another modules using SSH URL terraform failed to initialise workspace.

What problem are you facing?

I managed to clone terraform module using .git-credentials, but provider failed to initialise workspace because module contains references to another private repos using ssh based url

How could Crossplane help solve your problem?

Please make git configuration more flexible. Please add support for specifying ssh keys for terraform.

davidwincent commented 1 year ago

Has anyone successfully used private github repositories with provider-terraform?

github seems to have dropped support for password authentication 2021?

git clone https://github.com/***/argocd-apps.git
Cloning into 'argocd-apps'...
Username for 'https://github.com': ***
Password for 'https://***@github.com':
remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/***/argocd-apps.git/'

See https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls

ytsarev commented 1 year ago

@davidwincent we recommend using personal access tokens https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#using-a-personal-access-token-on-the-command-line that is totally supported.