Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

how to setup git locally with ssh

# REGISTER github account globally
git config --global user.name <"any name in quotes">
git config --global user.email <github email no quotes>

# NAV to .ssh (unix/powershell)
cd ~/.ssh
cd c:/Users/<user>
  
# CREATE "key"
ssh-keygen -t rsa -C <same email address>
# Press enter twice (optionally create pass).

# PRINT ~.pub contents and COPY or open .ssh file.
ssh-agent sh -c 'ssh-add; ssh-add -L'
# OR
cat ~/.ssh/id_rsa.pub

## ADD key to github.com
# github.com >settings >SSH and GPG keys: Make New: paste.

# CD to git dir (unix/win)
cd /srv  # OR home/git/ (https://serverfault.com/a/761420/956620)
cd c:/Users/<user>/git

# To run git-bash in PS: & 'C:Program FilesGitinsh.exe' --login

# START the ssh-agent (Make "lock")
# Be sure you're in git-bash(win) and in git folder!
# eval `ssh-agent -s` # not working win10
eval $(ssh-agent)

# INSERT "key"
ssh-add ~/.ssh/id_rsa

# ADD github fingerprint to known hosts
ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts

# CLONE your repo via ssh from github.
Comment

PREVIOUS NEXT
Code Example
Shell :: check ram bus speed 
Shell :: git delete local commit 
Shell :: raspberry pi install pip 
Shell :: linux check user group list 
Shell :: bash run inline command 
Shell :: ps aux tree 
Shell :: All matches were filtered out by modular filtering for argument 
Shell :: bash find only first answer 
Shell :: copy file using powershell script 
Shell :: search for filename recursively linux 
Shell :: how to remove a folder from git and not locally 
Shell :: angular cli install ubuntu 
Shell :: connect as root docker 
Shell :: how to find host name in linux 
Shell :: bash check diff starting at specific line 
Shell :: powershell progress bar 
Shell :: how to store a 6 digit number as 6 separate integers 
Shell :: how delete all wine files in linux 
Shell :: how to remove last migration in ef core 
Shell :: git change origin url 
Shell :: for k in range bash 
Shell :: install gulp 
Shell :: Update your Dart SDK 
Shell :: Default gateway -linux 
Shell :: upgrade pip version 
Shell :: f.lux for ubuntu 18.04 
Shell :: node ace list routes 
Shell :: install x centos 7 
Shell :: react native init 
Shell :: remove unnamed docker images 
ADD CONTENT
Topic
Content
Source link
Name
3+4 =