Support passphrase protected ssh keys #1184
-
Describe the bug cargo generate --git https://github.com/rustwasm/wasm-pack-template.git And I get: Error: Please check if the Git user / repository exists.
Caused by:
Failed to retrieve list of SSH authentication methods: Failed getting response; class=Ssh (23); code=Auth (-16) Desktop (please complete the following information):
Additional context # Personal account, - the default config
Host github.com-personal
HostName github.com
User git
IdentityFile ~/.ssh/id_rsa
# Work account
Host github.com-organization
HostName github.com
User git
IdentityFile ~/.ssh/id_ed25519 And I want to know how to fix it? |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 1 reply
-
Interesting, are your keys protected by a passphrase? As it seems it is using git over ssh even if you've given it a http url. When you comment out the .gitconfig lines you've mentioned then I guess it does work, right? |
Beta Was this translation helpful? Give feedback.
-
Yes, in my Windows PC, I do not have the config file i mentioned above, and it worked, but I do not know the reason of it. |
Beta Was this translation helpful? Give feedback.
-
@rakuten-JO can you please try the approach from the comment below and see if that would solve your issue? |
Beta Was this translation helpful? Give feedback.
-
I've tried that approach ( |
Beta Was this translation helpful? Give feedback.
-
Augustus 2023, it works for me ...
@moridinga please retry with latest |
Beta Was this translation helpful? Give feedback.
-
Adding the ssh key to ssh-agent should in general work eval $(ssh-agent)
ssh-add <path-to-your-private-key>
cargo ... or on mac eval $(ssh-agent)
ssh-add --apple-use-keychain <path-to-your-private-key>
cargo ... |
Beta Was this translation helpful? Give feedback.
Adding the ssh key to ssh-agent should in general work
or on mac