Git keeps asking for ssh passphrase when SSH is already defined in GitLab
I'm playing around with a personal GitLab account to get familiar with its' ins and outs. First, I followed https://docs.gitlab.com/ee/ssh/ on setting ssh keys and added public and private ED25519 keys to
~\.ssh. I added the public key to my GitLab account. Then, using the
glabCLI I was able to set up a repository which I could push to and pull from using
gitstill prompts me for my SSH passphrase every time I try to push to the repo. I tried the following:
- Adding https://docs.gitlab.com/ee/user/gitlab_com/#ssh-known_hosts-entries
- https://docs.gitlab.com/ee/ssh/#verify-that-you-can-connect using
ssh -T https://gitlab.com/my_username
The known host entries didn't have any noticeable effect on this behavior. Verifying I could connect threw the following error:
ssh: Could not resolve hostname https://gitlab.com/my_username
gitasking me to provide my passphrase every time I push and how can I fix this once and for all?
Passphrase is defined by the way you created your private key. When creating a key pair you need to opt for no passphrase on the private key - this should solve your issue.