Setting up on Ubuntu
Creates a new ssh key using the github email address:
1 |
ssh-keygen -t rsa -C "itabara@live.com" |
Then copy it to the clipboard:
1 2 |
sudo apt-get install xclip xclip -sel clip < ~/.ssh/id_rsa.pub |
Then go to https://github.com/account/ssh and click “Add another public key” and paste the clipboard and press “Add” Key”.
And now try to connect to github to see if everything is working:
1 2 |
ssh-add ~/.ssh/id_rsa ssh git@github.com |
If everything goes fine you should have something similar:
1 2 3 4 5 6 7 |
The authenticity of host 'github.com (192.30.252.128)' can't be established. RSA key fingerprint is SHA256:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'github.com,192.30.252.128' (RSA) to the list of known hosts. PTY allocation request failed on channel 0 Hi itabara! You've successfully authenticated, but GitHub does not provide shell access. Connection to github.com closed. |
Then you should install git (it should be already installed by default):
1 |
sudo aptitude install git-core git-gui git-doc |
Now you can configure git:
1 2 3 |
git config --global user.name "Iulian Tabara" git config --global user.email "itabara@live.com" git config --global github.user itabara |
Now get your token at GitHub -> Click “Settings” > Click “Personal Access Token”
1 |
git config --global github.token xxxxxxxxxxxxx |
You can create a github repository and clone locally.
1 |
git clone git@github.com:itabara/hello-world.git |