Reputation: 4857
I've created several repositories on GitLab and need to create more. This has worked for me in the past, but now I can no longer access.
So, please, how can I diagnose and fix?
My goal: I'm soon headed out of the country for an extended stay. I want to work on several projects on my notebook computer while I'm away.
I tried to create two new projects following the instructions "Existing Git Repository" on:
https://gitlab.com/writersglen/AntsleBook
But in both cases I get this when I try to push:
lloyd@wg-dev:~/WG/Books/Titles/Antsle$ git push -u origin --all
sign_and_send_pubkey: signing failed: agent refused operation
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
So far as I can tell, I have the correct public key on GitLab.
I get a similar message when I try to pull from successfully created repositories.
So, I be very grateful if some kind soul can show me how to get out of this mess.
Best wishes,
LRP
Upvotes: 5
Views: 4326
Reputation: 862
If you are using ubuntu and have used Gitlab's manual for generating ssh keys, I must mention that there is a problem in the command they have provided. In that manual, keys has been generated using -o
in ssh-keygen
command, but keys generated by this command are not being supported by gnome-keyring. more information here:https://unix.stackexchange.com/a/351742/306361
Upvotes: 1
Reputation: 86
I had the same error message. In my case some of the private keys had too open permissions.
I fixed it by changing the permissions for private keys to 600 (-rw-------)
and the public keys to 644 (-rw-r--r--)
Upvotes: 3
Reputation: 83527
It appears you have not added your private key to your local machine's ssh agent. To do so follow these steps:
eval $(ssh-agent)
ssh-add ~/.ssh/id_rsa
Then follow the prompts for your key password, if you created it with one. If you created a key with a different file name and/or location, use it instead of ~.ssh/id_rsa
.
Upvotes: 10