Answers for "gitlab multiple ssh keys local"

16

gitlab set ssh key

Generate SSH Key:
- ssh-keygen -t rsa -C "Comment for key"

Add it to gitlab:
- cat ~/.ssh/id_rsa.pub (copy all output)
- Open web browser, go to: Gitlab > User Settings > SSH Keys
- Paste copied output in the SSH key section

Test connection:
- ssh -T [email protected] (can use private url)

Do some git stuff:
- git clone something
Posted by: Guest on September-12-2021
0

git clone using ssh key from gitlab

git clone [email protected]:userName/projectName.git --config core.sshCommand="ssh -i ~/location/to/private_ssh_key"
Posted by: Guest on October-31-2021

Browse Popular Code Answers by Language