0

I have created a git repository and trying to push to github. I tried these:

#1 
git remote add origin https://github.com/userid/reponame.git
git push -u origin master

#2
git remote add origin https://userid@github.com/userid/reponame.git
git push -u origin master

It says

error: The requested URL returned error: 403 while accessing
  https://github.com/userid/reponame.git/info/refs

git remote -v shows for above two tries

  1. https://github.com/userid/reponame.git
  2. https://userid@github.com/userid/reponame.git

I don't want to use ssh. Is there any way to resolve it?

user2636464
  • 685
  • 7
  • 17
  • use `git remote -v` to check if your origin is already added like `origin https://userid@github.com/userid/repo.git (fetch) origin https://userid@github.com/userid/repo.git (push)` – ChoiZ Apr 12 '14 at 11:11
  • The error `https://github.com//.git/info/refs` worries me. The double `//` should be something like `https://github.com//.git/info/refs` Are you SURE your remote url (fetch AND push) are correct? **git remote -vv** – Dave Apr 12 '14 at 11:43
  • I have edited with more info. please help – user2636464 Apr 12 '14 at 15:45
  • @iltempo HTTPS for git ***is not read-only***. On GitHub, only HTTP is read-only. –  Apr 12 '14 at 19:46
  • `-u` ***is not a "user" option*** for `git push`. It's an option to enable the local branch to track the remote-branch that you're pushing to the remote repo. –  Apr 12 '14 at 19:50
  • thanks everyone. It has started working now with the second optiongit remote add origin https://userid@github.com/userid/reponame.git git push -u origin master – user2636464 Apr 15 '14 at 11:09

0 Answers0