From 3f5b8f5d9203aa7ffb7fbe9cdbaf9dba3da6cae6 Mon Sep 17 00:00:00 2001 From: Hybris95 <hybris_95@hotmail.com> Date: Thu, 01 May 2014 16:14:15 -0400 Subject: [PATCH] Fixes sort, page building and search functions on "my tickets" page. --- src/site/setup_transport_ssh.mkd | 50 ++++++++++++++++++++++++++++++-------------------- 1 files changed, 30 insertions(+), 20 deletions(-) diff --git a/src/site/setup_transport_ssh.mkd b/src/site/setup_transport_ssh.mkd index c3d97a3..7b53624 100644 --- a/src/site/setup_transport_ssh.mkd +++ b/src/site/setup_transport_ssh.mkd @@ -23,24 +23,24 @@ Then you can upload your *public* key right from the command-line. - 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 + cat ~/.ssh/id_rsa.pub | ssh -l <username> -p 29418 <hostname> keys add + cat c:\<userfolder>\.ssh\id_rsa.pub | ssh -l <username> -p 29418 <hostname> 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. Once you've done both of those steps you should be able to execute the following command without a password prompt. - ssh -l <username> -p 29418 <hostname> gitblit version + ssh -l <username> -p 29418 <hostname> ### Setting up an SSH alias Typing the following command syntax all the time gets to be rather tedious. - ssh -l <username> -p 29418 <hostname> gitblit version + ssh -l <username> -p 29418 <hostname> You can define an alias for your server which will reduce your command syntax to something like this. - ssh <alias> gitblit version + ssh <alias> Create or modify your `~/.ssh/config` file and add a host entry. If you are on Windows, you'll want to create or modify `<userfolder>\.ssh\config`, where *userfolder* is dependent on your version of Windows. Most recently this is `c:\users\<userfolder>`. @@ -54,30 +54,40 @@ Gitblit supports SSH command plugins and provides several commands out-of-the-box. -#### gitblit +#### keys -The *gitblit* command has many subcommands for interacting with Gitblit. +The *keys* command dispatcher allows you to manage your public ssh keys. You can list keys, add keys, remove keys, and identify the key in-use for the active session. ##### 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 keys add - -##### 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 keys remove - -You can also remove all your public keys from your account. - - ssh -l <username> -p 29418 <hostname> gitblit keys remove ALL + cat ~/.ssh/id_rsa.pub | ssh -l <username> -p 29418 <hostname> keys add ##### keys list -Show the SSH keys you have added to your account. +Show the SSH public keys you have added to your account. - ssh -l <username> -p 29418 <hostname> gitblit keys list + ssh -l <username> -p 29418 <hostname> keys list + +##### keys remove + +Remove an SSH public key from your account. This command accepts several input values, the most useful one is an index number which matches the index number displayed in the `list` command. + + ssh -l <username> -p 29418 <hostname> keys remove 2 + +You can also remove all your public keys from your account. + + ssh -l <username> -p 29418 <hostname> keys remove ALL + +##### keys permission + +You may control the access permission for each SSH key. This is more of a safety feature than a security measure. + +| Permission | Description | +| ---------- | ----------------------------------------------- | +| V | SSH key may not be used for clone/fetch or push | +| R | SSH key may be used to clone/fetch | +| RW | SSH key may be used to clone/fetch and push | -- Gitblit v1.9.1