Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

gitlab set ssh key

Generate SSH Key:
- ssh-keygen -t rsa -C "Comment for key"

Add it to gitlab:
- cat ~/.ssh/id_rsa.pub (copy all output)
- Open web browser, go to: Gitlab > User Settings > SSH Keys
- Paste copied output in the SSH key section

Test connection:
- ssh -T git@gilab.domain.com (can use private url)

Do some git stuff:
- git clone something
Comment

Adding ssh key to gitlab

#For example, for ED25519:
> ssh-keygen -t ed25519 -C "<comment>"
#For 2048-bit RSA:
> ssh-keygen -t rsa -b 2048 -C "<comment>"

Generating public/private ed25519 key pair.
Enter file in which to save the key (/home/user/.ssh/id_ed25519):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:

> eval $(ssh-agent -s)
> ssh-add <directory to private SSH key>

Ssh config
# GitLab.com
Host gitlab.com
  PreferredAuthentications publickey
  IdentityFile ~/.ssh/gitlab_com_rsa

# Private GitLab instance
Host gitlab.company.com
  PreferredAuthentications publickey
  IdentityFile ~/.ssh/example_com_rsa
Comment

PREVIOUS NEXT
Code Example
Shell :: jinja escape 
Shell :: docker network Rabbitmq 
Shell :: Install Deno - Chocolatey (Windows) 
Shell :: linux scroll terminal 
Shell :: npm commands 
Shell :: install nodejs via homebrew 
Shell :: What commands would you use to force an overwrite of your local files with the master branch? 
Shell :: bash create user with encrypted password 
Shell :: download gif 
Shell :: shell script to convert yaml 
Shell :: time is not updating from internet ubuntu 
Shell :: EDIT WSL2 terminal user% 
Shell :: zip command in linux 
Shell :: static address raspberry 
Shell :: git update from another branch 
Shell :: increase swap size ubuntu 
Shell :: remove all files named ubuntu 
Shell :: copy a file from home directory to other directory in linux 
Shell :: how to scroll up in linux terminal 
Shell :: dokcer remove image 
Shell :: create github repository from git bash 
Shell :: how to update git password in windows 
Shell :: rabbitmqctl 
Shell :: htop ubuntu installation command 
Shell :: scp command from local to remote 
Shell :: how to install path adb 
Shell :: flutter doctor --android-licenses error 
Shell :: mountebank docker quick start 
Shell :: how to get data from pc to cluster 
Shell :: bluettoth device not shwoing as output in ubuntu 
ADD CONTENT
Topic
Content
Source link
Name
3+3 =