You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> git pull
Enter passphrase for key 'c:\XXX\pkey':xxxxxx
...pulling...
Running terraform init:
Downloading git::ssh://git@github.com/XXXXXX?ref=v1.0.0 for tags...
╷
│ Error: Failed to download module
│
│ Could not download module "X" (tags.tf:1) source code from "git::ssh://git@github.com/XXXXX.git":
│ error downloading 'ssh://git@github.com/XXXXX': C:\Program Files\Git\cmd\git.exe exited with 128:
│ Cloning into '.terraform\modules\X'...
│ git@github.com: Permission denied (publickey).
│ fatal: Could not read from remote repository.
│
│ Please make sure you have the correct access rights
│ and the repository exists.
Terraform Version
Terraform v1.2.3
on windows_amd64
Steps to Reproduce
Setup gitconfig with conditionally load the a config from a specific path
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
This issue was opened from my professional account by mistake.
Please visit the clone: #31255
Cloning an enterprise github repo with ssh that is part of a conditional config ends with
git@github.com: Permission denied (publickey)
.##Git config - main
##Git config - C:\XXX\.gitconfig
Running git pull works correctly:
Running terraform init:
Terraform Version
Terraform v1.2.3
on windows_amd64
Steps to Reproduce
terraform init
References
Additional Info
I ve tried the ssh config file and it works, but this way I have only one key for all github projects.
SSH config that worked:
The text was updated successfully, but these errors were encountered: