From fdf85cf245cddf121d35799637aaea8795db2ebd Mon Sep 17 00:00:00 2001 From: James Moger <james.moger@gitblit.com> Date: Thu, 10 Apr 2014 18:58:09 -0400 Subject: [PATCH] Fix exception handling for account with no public keys --- src/site/setup_transport_ssh.mkd | 34 +++++++++++++++------------------- 1 files changed, 15 insertions(+), 19 deletions(-) diff --git a/src/site/setup_transport_ssh.mkd b/src/site/setup_transport_ssh.mkd index 38742ec..c3d97a3 100644 --- a/src/site/setup_transport_ssh.mkd +++ b/src/site/setup_transport_ssh.mkd @@ -23,8 +23,8 @@ Then you can upload your *public* key right from the command-line. - cat ~/.ssh/id_rsa.pub | ssh -l <username> -p 29418 <hostname> gitblit add-key - cat c:\<userfolder>\.ssh\id_rsa.pub | ssh -l <username> -p 29418 <hostname> gitblit add-key + cat ~/.ssh/id_rsa.pub | ssh -l <username> -p 29418 <hostname> gitblit keys add + cat c:\<userfolder>\.ssh\id_rsa.pub | ssh -l <username> -p 29418 <hostname> gitblit keys add **NOTE:** It is important to note that *ssh-keygen* generates a public/private keypair (e.g. id_rsa and id_rsa.pub). You want to upload the *public* key, which is denoted by the *.pub* file extension. @@ -52,36 +52,32 @@ ### SSH Commands -#### git - -You will likely never directly interact with the git command, but it is used by your git client to clone, fetch, and push commits to/from your Gitblit server. - -##### git-receive-pack - -This is the command for processing pushes sent from clients. - -##### git-upload-pack - -This is the command for sending refs and commits to clients. +Gitblit supports SSH command plugins and provides several commands out-of-the-box. #### gitblit -The *gitblit* command has many subcommands for interacting gitblit. +The *gitblit* command has many subcommands for interacting with Gitblit. -##### add-key +##### keys add Add an SSH public key to your account. This command accepts a public key piped to stdin. - cat ~/.ssh/id_rsa.pub | ssh -l <username> -p 29418 <hostname> gitblit add-key + cat ~/.ssh/id_rsa.pub | ssh -l <username> -p 29418 <hostname> gitblit keys add -##### rm-key +##### keys remove Remove an SSH public key from your account. This command accepts a public key piped to stdin. - cat ~/.ssh/id_rsa.pub | ssh -l <username> -p 29418 <hostname> gitblit rm-key + cat ~/.ssh/id_rsa.pub | ssh -l <username> -p 29418 <hostname> gitblit keys remove You can also remove all your public keys from your account. - ssh -l <username> -p 29418 <hostname> gitblit rm-key ALL + ssh -l <username> -p 29418 <hostname> gitblit keys remove ALL + +##### keys list + +Show the SSH keys you have added to your account. + + ssh -l <username> -p 29418 <hostname> gitblit keys list -- Gitblit v1.9.1