Saravanan Setty
Saravanan Setty

Reputation: 438

Github pushing error

I wanted to make a new repository on github and after following the initial steps, when I came to this step : git push -u origin master I get the following error :

error: The requested URL returned error: 403 while accessing https://github.com/sjs7007/wget-nptel-download-script.git/info/refs

fatal: HTTP request failed

Upvotes: 2

Views: 1889

Answers (1)

strnk
strnk

Reputation: 2073

The HTTP 403 return code means that the access is forbidden, often because of bad credentials or wrong GIT version. Chances are that you mistyped your password.

To prevent these errors you can use the GIT credential helper which will keep your password in memory for some time and avoid you to type it every time you commit something through HTTP :

git config --global credential.helper 'cache --timeout=3600'

Where 3600 is the number of seconds you want your password kept in memory.

The best (and most secure) way to commit to github (and GIT repositories in general) remains SSH, you don't have to memorize your password (excepted if you set a password on your SSH private key) and you are automatically authenticated to GitHub repositories, see their help page about SSH keys.

Upvotes: 1

Related Questions