Setting up a new Git Repo/Project on Terminal
touch README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin git@github.com:enesccinar/<reponame>.git
git push -u origin master
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Creating an SSH Key



pbcopy < ~/.ssh/id_rsa.pub
# copies the id_rsa.pub file to clipboard

ssh -T git@github.com
# Hi enesccinar! You've successfully authenticated, but GitHub does not provide shell access.
eval "$(ssh-agent -s)"
> Agent pid 8242
ssh-add -l -E sha256
> The agent has no identities.
ssh-add ~/.ssh/id_rsa
> Identity added: /Users/{username}/.ssh/id_rsa
ssh-add -l -E sha256
> 4096 SHA256:kIyOSahcDUbwkqFiFgKIyzNW.... (RSA)
git push -u origin master
> ERROR: Repository not found.
> fatal: Could not read from remote repository.
> Please make sure you have the correct access rights
> and the repository exists.
Creating the repo on GitHub
GIT does not have a native command to create a repository. I am going to use the hub package to manage.
$ brew install hub
$ hub version
> git version 2.15.0
> hub version 2.14.2
$ hub create
> github.com username: enesccinar
> github.com password for enesccinar (never stored):
> https://github.com/enesccinar/bosphorus
this command creates a public repository!
$ git push -u origin master
> Counting objects: 3, done.
> Writing objects: 100% (3/3), 209 bytes | 104.00 KiB/s, done.
> Total 3 (delta 0), reused 0 (delta 0)
> To github.com:enesccinar/bosphorus.git
* [new branch] master -> master
> Branch 'master' set up to track remote branch 'master' from 'origin'.