Connecting to GitLab
GitLab doesn't use username/password authentication for Git interaction, but rather identifies users by SSH key. The following is a short summary of how to set that up. More details as https://gitlab.com/help/ssh/README.
- On the machine to be used for development, generate SSH public/private keys.
ssh-keygen
on Linux or Git Bash in Git for Windows- Be sure to include a meaningful comment (
-C <comment>
), usually including your username, the name of the machine on which you're creating the key, and perhaps the date. - E.g.:
ssh-keygen -t rsa -C "pittmara@oregonstate.edu_2018-07-06_GitLab" -f ~/.ssh/id_rsa_gitlab
- Print the public key to the screen:
cat ~/.ssh/id_rsa_gitlab.pub
- Add your key to GitLab
- Login to GitLab
- Click your profile picture in the top right corner and click Settings.
- Select SSH Keys from the sidebar on the left.
- Copy the contents of your public SSH key (printed in the previous step) and paste it into the Key field and click Add Key.
- Open your
~/.ssh/config
file:Host gitlab.com ForwardX11 no RSAAuthentication yes IdentityFile ~/.ssh/id_rsa_gitlab
where~/.ssh/id_rsa_gitlab
is the path to your private SSH key you've created to use with GitLab. - Now you can interact with all GitLab projects you own and/or have permission to access simply by using the
git
command. No user name or password need be entered--GitLab will use git@gitlab.com for the username and identify your GitLab account name by your SSH key. You can test the connection with the commandssh git@gitlab.com
. It should log in to GitLab, issue a welcome message, and close the connection.pittmara@flip2:~ $ ssh git@gitlab.com PTY allocation request failed on channel 0 Welcome to GitLab, @randallpittman! Connection to gitlab.com closed.
Select a page group name to see sub-pages.
- Home
- Radar
- Software
- Inventory
- Technical Guides (scripting, linux tools)
- Cape Disappointment
- Newport
- Logs
- Wave Energy
- Processing
- Development
- HPx Radar Server
- WIMR PC Setup
- Field Experiments
- Reports and Investigations
- Trailers
- Public
Sandbox for playing around with markup syntax, etc.
This wiki installation is running PmWiki pmwiki-2.3.21, version number 2003021.