I am completely new to Github...
I have been learning Android from udacity and I cloned one of the forks from the public repository.
Now, I want to create my own private repository and push the files to it but it always tries to push them to the udacity repository instead of mine.
Here are the commands I used:
git remote add origin <my_git_url>
git add .
git commit -m "First Commit"
git push origin master
But it just keeps returning this:
remote: Permission to udacity/Sunshine-Version-2.git denied to xxxx.
fatal: unable to access 'https://github.com/udacity/Sunshine-Version-2.git/': The requested URL returned error: 403
Please help....
答案 0 :(得分:1)
The error says you don't have rights to push there.
Most probably, you have to fix your repository url.
git remote remove origin
git remote add origin https://github.com/your-username/your-repository
git push origin master
Then it will ask you to provide the credentials. Later you can get rid of that using SSH urls. Here is a nice article on how to get started using SSH keys.