0

I'm playing around with a personal GitLab account to get familiar with its' ins and outs. First, I followed this primer 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 glab CLI I was able to set up a repository which I could push to and pull from using git.

Unfortunately, git still prompts me for my SSH passphrase every time I try to push to the repo. I tried the following:

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

Why is git asking me to provide my passphrase every time I push and how can I fix this once and for all?

2 Answers 2

1

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.

1

You can try adding your passphrase to the keychain using ssh-add -K, this will ask you the passphrase for the first time and later on it won't ask.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.