Reputation: 23
Problem when pushing app to github. This is what I entered into the command line. Hopefully it's just a small problem I can fix thanks.
git init
git add README.md
git commit -m "first commit"
git remote add origin [email protected]:travi5567/first_app.git
git push -u origin master
This is the error I get:
Traviss-MacBook-Pro:sample_app Travis$ git push -u origin master
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Upvotes: 1
Views: 286
Reputation: 28747
If you don't know how to use SSH keys or would rather not you can also use the https
remote like so:
git remote add origin https://[email protected]/travis5567/first_app.git
git push origin master
Password for travis5567: <enter your password>
# regular output from a git push
Upvotes: 2
Reputation: 530
GitHub uses SSH keys to configure access to git repositories. If you are the owner you can push to the repo but you need to tell git your SSH key so they know who you are first.
It's all explained on the GitHub website - https://help.github.com/articles/generating-ssh-keys
Upvotes: 2