Skip to content

Instantly share code, notes, and snippets.

@blurayne
Created January 30, 2019 15:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save blurayne/505b8567a2cd4a4e17f91cbd10af5af3 to your computer and use it in GitHub Desktop.
Save blurayne/505b8567a2cd4a4e17f91cbd10af5af3 to your computer and use it in GitHub Desktop.

Start an ssh-agent

If not yet done add to your rc-file ike .bashrc or .zshrc

$ eval `ssh-agent`

Add your generated key

$ ssh-add ~/.ssh/id_rsa

List keys

$  ssh-add -l

GitShell anyone?

GitLab should response with git-shell. You shall log in by git-user only!

$ ssh -T git@myserver.lab
Welcome to GitLab, Markus Geiger!

You should not get an Interactive Shell like sh!

Debugging
Git Version> 2.2
GIT_SSH_COMMAND="ssh -vvv -T git@gitserver" GIT_TRACE=2 git clone git@gitserver/foo.git
Git Version < 2.2
```bash

 
# Debugging

```bash
ssh -vv -i privatekey -l git $@
GIT_SSH="sshwrapper-script" GIT_TRACE=2 git clone git@gitserver/foo.git

Other way

git config --global credential.helper cache
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment