0

I already have a username and ssh key setup on my local git repo that allows me to push to public github for school projects.

however, my job has given me access to a privately hosted gitlab project. I generated a second ssh key and linked it to the new work login for the private project.

When I try to clone the project down from the private gitlab, It says "Permission denied (publickey)" and I am pretty sure this is because my computer is still using the public login info.

how on earth do I switch between the two?

Thank you in advance :)

  • GitLab is not the same as GitHub. – Code-Apprentice Mar 09 '18 at 19:52
  • You probably need SSH configuration for each server to use the correct identity file, but it is basically impossible to tell without more information. – Mad Physicist Mar 09 '18 at 19:53
  • The two should not interfere. Double-check that you correctly uploaded your public key to the GitLab host and that you add your private key to your local SSH agent. – Code-Apprentice Mar 09 '18 at 19:54
  • Yes they can. In order for us to help you, we need more information about the **exact** steps you followed to set up your SSH key with the private GitLab server. – Code-Apprentice Mar 09 '18 at 19:55
  • https://docs.gitlab.com/ce/ssh/README.html shows how to set up SSH for GitLab. – Code-Apprentice Mar 09 '18 at 19:57
  • I generated a second SSH key on my local machine with the email address that corresponds with my work's private gitlab login. I now have two keys in my .ssh folder (id_rsa, which links to my school github acct) and (id_rsa_other, which I put into the ssh key area for the private gitlab) – matthewmarshdev Mar 09 '18 at 20:03

0 Answers0