Commit 4fb77a90 authored by Chris Bills's avatar Chris Bills


parent ba5431a8
......@@ -14,23 +14,46 @@ More information about branching, forking, rebasing, merging and all that good s
### Getting Started with GitLab
1. Generate an SSH keypair for GitLab (optional)
* `ssh-keygen -t rsa -b 2048 -f ~/.ssh/`
You can use an existing keypair (e.g. `id_rsa` / ``) if you prefer, but it is generally a good idea to have unique keys for distinct services. If you already have a keypair you would like to use, skip this step.
ssh-keygen -t rsa -b 2048 -f ~/.ssh/
**Note:** This command will generate 2 files; `~/.ssh/` (your public key) and `~/.ssh/` (your private key).
1. Add your SSH public key to your account on GitLab:
In order to authenticate your user with GitLab, you will need to provide the public portion of the keypair you wish to use to the GitLab service.
1. Browse to:
1. Copy your public key and paste it into the Key field
1. Set the title to something meaningful
1. Click Add Key
1. Copy your **public** key (the filename ends with `.pub`) to your clipboard
1. Paste your public key into the "Key" field
1. Set the "Title" to something meaningful
1. Click "Add Key"
1. Add an entry for GitLab in your ~/.ssh/config file (Optional but very convenient)
* This will allow you to type something like `git clone xgitlab:namespace/project.git` without needing to pass a username, fqdn, or ssh identity to git
Host xgitlab
`~/.ssh/config` is your user's configuration file that is used by the ssh client. You can set the specific SSH options to use for new connections by adding an entry to the file, like below:
Host xgitlab
User git
IdentityFile ~/.ssh/
Without the above entry in your SSH config, to clone a project, you might have to type:
GIT_SSH_COMMAND='ssh -i ~/.ssh/' git clone
But with the above entry in your SSH config, you can clone the project by typing:
git clone xgitlab:cpbills/git-tips.git
### Setting the git author
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment