Open stephnangue opened 1 year ago
On Unix : ssh-keygen -b 2048 -t rsa -f $HOME/git_rsa -q -N "" On Windows : ssh-keygen -b 2048 -t rsa -f C:/temp/git_rsa -q -N ""
ssh-keygen -b 2048 -t rsa -f $HOME/git_rsa -q -N ""
ssh-keygen -b 2048 -t rsa -f C:/temp/git_rsa -q -N ""
cat $HOME/git_rsa.pub
cd bootstrap git config --list --local git config --local core.sshCommand "ssh -i $HOME/git_rsa -o StrictHostKeyChecking=no" git config --list --local
cd bootstrap
git config --list --local
git config --local core.sshCommand "ssh -i $HOME/git_rsa -o StrictHostKeyChecking=no"
ssh-keyscan -H github.com >> $HOME/.ssh/known_hosts
git remote add github git@github.com:stephnangue/bootstrap.git
git push github main --tags
git branch -va git log --graph --oneline
git branch -va
git log --graph --oneline
Show a figure to resume the chapter
Generate a SSH key pair
On Unix :
ssh-keygen -b 2048 -t rsa -f $HOME/git_rsa -q -N ""
On Windows :ssh-keygen -b 2048 -t rsa -f C:/temp/git_rsa -q -N ""
Show the content of 'git_rsa.pub'
cat $HOME/git_rsa.pub
Store the content of that file on GitHub
Tell Git to use the private key 'git_rsa' to connect to remote repositories via SSH when you are working in the repository 'bootstrap'
cd bootstrap
git config --list --local
git config --local core.sshCommand "ssh -i $HOME/git_rsa -o StrictHostKeyChecking=no"
git config --list --local
Add GitHub.com public key into your 'known_hosts' file
ssh-keyscan -H github.com >> $HOME/.ssh/known_hosts
Create the remote repository 'bootstrap' on GitHub
Add a SSH reference to that remote repository
git remote add github git@github.com:stephnangue/bootstrap.git
Push the content of the main branch to the remote repository, including all tags
git push github main --tags
Notice that there is now a remote main branch pointing to the same commit as the local remote branch
git branch -va
git log --graph --oneline