$ ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/home/XXX/.ssh/id_rsa): Created directory '/home/XXX/.ssh'. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/XXX/.ssh/id_rsa. Your public key has been saved in /home/XXX/.ssh/id_rsa.pub. The key fingerprint is: SHA256:MaEZmq4XZASzm79wb2E2gfW9YITZhU7o03go2byyCpc XXX@XXX The key's randomart image is: +---[RSA 2048]----+ | | | | | | | | | 何か | | | | | | | | | +----[SHA256]-----+
$ cd ~/.ssh $ ls id_rsa id_rsa.pub $ less id_rsa.pub
$ mkdir test-rep $ cd test-rep $ echo "# hub test rep" > README.md $ git init
Hubの見せ場!Github上にリポジトリを作る $ git create Updating origin The authenticity of host 'github.com (192.30.252.128)' can't be established. RSA key fingerprint is SHA256:XXX. 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. created repository: xxx/test-rep
(もしかしたら一回目だとGithubのユーザー名、パスワードを聞かれるかもしれません。 そのときはログインしてください) $ git add . $ git commit -m "first commit" $ git push -u origin master Counting objects: 3, done. Writing objects: 100% (3/3), 227 bytes | 0 bytes/s, done. Total 3 (delta 0), reused 0 (delta 0) To git@github.com:xxx/test-rep.git * [new branch] master -> master Branch master set up to track remote branch master from origin.