Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git error 400 when doing push

When I do a git push I come up with this error:

error: The requested URL returned error: 400 while accessing https://github.com/nathandunn97/SchoolAdvisor.git/info/refs?service=git-receive-pack fatal: HTTP request failed

I am using Ubuntu 13.04 and my git version is 1.8.1.2.

like image 348
Nathan Dunn Avatar asked Aug 06 '13 19:08

Nathan Dunn


1 Answers

I has something similar to this on an internally hosted git repository (so I am not 100% sure it will fix your problem on github). "Git pull" worked fine, but "git push" gave me:

error: The requested URL returned error: 400 while accessing http://10.3.231.11/fisheye/git/myrep.git/info/refs

What worked for me was going into.git/config, and changing the url to include my username in the url:

[remote "origin"]
    fetch = +refs/heads/*:refs/remotes/origin/*
    url = http://[email protected]/fisheye/git/myrep.git

It then asked for a password after the push command, then pushed the files successfully.

like image 98
wobbily_col Avatar answered Sep 30 '22 01:09

wobbily_col