Tool handrail Git and Ssh
by snonov
Some Git commands (remote operations)
To check your remote from local : git remote -v
To change on local refers remote host : git remote set-url origin git@gitlab.example.com:my-group/my-project.git
Some ssh commands
To get ssh trace (debug, verbose)
GIT_TRACE=1 GIT_SSH_COMMAND=”ssh -vvv” git clone git@gitlab.example.com:my-group/my-project.git
Generate a new key
ssh-keygen -t rsa -C “userName”
Test host access
ssh gitlab.example.com -v
or openssl s_client -connect gitlab.example.com:port
remote migration
You can keep same ssh key (or generate and use a new one). Keeping same check :
- config file (cat ~/.ssh/config), there should be an entry with new remote host specifying “IdentityFile ~/.ssh/MyPrivateKey” on it
- known_host (cat ~/.ssh/known_hosts) should have an entry with new remote host (check add finger print to add)
Some Ssh cheasheet and infos
Cheatsheet :
Specific :
Others :
tags: Tool - Handrail - Git - Ssh