ssh connection to gitlab
DESCRIPTION
it tell you how to connect gitlab without passwordTRANSCRIPT
PowerPoint Presentation
SSH connection to GitlabGitlabGitLab is open source software to collaborate on code.Create projects and repositories, manage access and do code reviews.GitLab allows you to: Keep your code secure on your own serverManage repositories, users and access permissionsCommunicate through issues, line-comments and wiki pagesPerform code review with merge requests
Features
Features (cont) - comment code
Features (cont)
Generate keys (Linux/Mac)SSH KeysSSH key allows you to establish a secure connection between your computer and GitLabGenerate keysIn your computer, open your terminal and type:ssh-keygen -t rsa -C youremail
Note: should use default name id_rsa, Must empty for passphrase
Generate keys (Linux/mac) Just use code below to dump your public key cat path_to_your_public_key
Add GitLab SSH Keys ( go to slide 12)
Generate keys (window git shell) Open Git Bash ( A feature when you install git from http://git-scm.com)
Do as slide number 7-8 (Generate keys (Linux/Mac )) add a config file named config under ~/.ssh directory
Host gitlab.jmango.net Hostname gitlab.jmango.net User git IdentityFile C:\Users\JMango\.ssh\id_rsa9Generate keys (Window with putty & sourcetree)Download Putty (Secure SSH client) and Puttygen LinkCreate public/private key.1st Way : open puttygen2nd Way: in SourceTree, go to Tools > Create or Import SSH Keys
Generate keys (Window - with putty & sourcetree)Click Generate to create key pair or load key (if any)Click save privates key button to save a .ppk fileCopy all in Public key for pasting into OpenSSH box and save to public key file ( Dont click save public key button) Add GitLab SSH Keys (go to 12th slide )
Add GitLab SSH KeysClicks Profile settings in menu bar.Clicks SSH Keys tab.Clicks Add SSH Keys buttonAdd your public key here ( got in previous step)
Push/pull/clone code to GitlabAdd remote repository server with URL: [email protected]:Namespace/Projectname.git
SSH Public key authentication failed, login still request forpasswordThe reason:The login process requires that the private key (id_dsa) and the public key stored on the remote server (authorized_keys) are stored on a folder that can only be accessed by the corresponding users.
Resolve:
$ chmod -R 700 .sshQ & A