0

I typed into the terminal:

Parkers-MacBook-Pro:first_app ppreyer$ git push -u origin master
Username: 
Password:

And I get this error:

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

fatal: HTTP request failed

I'm guessing it has something to do with my username and password but I feel like I'm entering in the right information. Is there a way to figure out what my username and password are?

Fatih Arslan
  • 16,499
  • 9
  • 54
  • 55
ppreyer
  • 6,547
  • 4
  • 20
  • 18

3 Answers3

1

Looks like your remote url is wrong.

Try running the following commands:

git remote rm origin
git remote add origin git@github.com:ppreyer/first_app.git
git push origin master
Gazler
  • 83,029
  • 18
  • 279
  • 245
  • After I type git push origin master I get this error:error: src refspec master does not match any. error: failed to push some refs to 'git@github.com:ppreyer/first_app.git' Any ideas? – ppreyer Jun 06 '12 at 18:40
0

You might have cloned the public read only url. Also Its better if you can setup ssh key and add it in your github account .

Follow this guide .

To fix the problem you can facing , You can follow the answer posted by Gazier. I am adding one more way of doing it.

  1. edit .git/config file under your repo directory
  2. find url=entry under section [remote "origin"]
  3. make sure it is git@github.com:ppreyer/first_app.git

Now try to push the origin to master

Vamsi Krishna B
  • 11,377
  • 15
  • 68
  • 94
0

Add Your GitHub Username to Your "remote.origin.url" just before github.com in your url:

https://ppreyer@github.com/ppreyer/first_app.git

dlanberg
  • 9
  • 1