1

This is what I'm following to push the changes from local to git and I keep getting this error.

push an existing repository from the command line

git remote add origin https://github.com/myuserame/mytestrep.git
git push -u origin master

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

replaced the username and reponame

I have git installed in centOS 6.5. But whenever I try to push something to git I get 403 forbidden error. I see that the git version I'm using is older and I thought upgrading would help resolve this issue.

The main issue I'm facing is exactly mentioned here but I don't really get the answer. I have created a repo in the git, created a folder locally and with some sample file. Then git init and the commit. But when I try to push the changes I was expecting it to ask for logins instead it is throwsing 403 fatal http request error.

Pushing to Git returning Error Code 403 fatal: HTTP request failed

So -

I'm trying to upgrade git version on centos. How do I upgrade git version on cent os?

[root@localhost ~]# git version
git version 1.7.1
[root@localhost ~]# yum install git
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: centos.excellmedia.net
 * epel: ftp.riken.jp
 * extras: centos.excellmedia.net
 * updates: centos.excellmedia.net
Package git-1.7.1-3.el6_4.1.i686 already installed and latest version
Nothing to do
[root@localhost ~]# 
Community
  • 1
  • 1
sython
  • 29
  • 2
  • 9
  • 2
    use the git version from rpmforge: http://stackoverflow.com/questions/21820715/how-to-install-latest-version-of-git-on-centos-6-x – Dirk Trilsbeek May 17 '15 at 14:57
  • That's the most recent official version. The next best resource for quality packages that I would recommend is [IUS](https://iuscommunity.org/pages/Repos.html). I would *not* recommend rpmforge generally as the quality has been hit or miss over time. – Etan Reisner May 17 '15 at 18:27
  • @EtanReisner I get 403 error whenever I try to push something to the repo, I'm not sure what exactly it is. – sython May 17 '15 at 19:00
  • Push to the git repo? With what git? To what repo? Using an http transport I assume? – Etan Reisner May 17 '15 at 19:59
  • Pushing to git repo requires an authenticated session. HTTP error code `403` means `FORBIDDEN`. Check if you do have permission to push into the repo. – alvits May 17 '15 at 21:56

0 Answers0