Thursday, January 25, 2024

Welcome to GitLab, @wrongusername

Sometimes, you have a personal and work account on GitLab, and your system could just log you in with the wrong one. Here is how to handle such situations.

1. Navigate to your cloned repository directory.

2. Add your private key to SSH: ssh-add ~/.ssh/id_ed1234_gitlab

3. Check whether you see the correct user now: ssh -T git@gitlab.com


Bonus:

GIT_SSH_COMMAND="ssh -i ~/.ssh/id_ed1234_gitlab" git clone git@github.com:xxx/yyyy.git

No comments:

Post a Comment