Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't access GitLab

Tags:

git

gitlab

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

like image 954
Lloyd R. Prentice Avatar asked Feb 06 '18 19:02

Lloyd R. Prentice


2 Answers

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.

like image 168
Code-Apprentice Avatar answered Oct 30 '22 15:10

Code-Apprentice


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--)

like image 23
Oliver Weissbarth Avatar answered Oct 30 '22 15:10

Oliver Weissbarth