4

I've got a windows 7 setup behind a corporate proxy and cntlm to avoid auth problems. Unfortunately, every time I do push a repo:

$ git push --progress --porcelain origin refs/heads/master:master

I've got the following errors:

remote: Anonymous access to oats4goats/EloquentJS.git denied.
fatal: Authentication failed for 'https://github.com/oats4goats/EloquentJS.git/'"

although it prompts me the credentials and I explicitly specify my username and pass:

Username for 'https://github.com': oats4goats
Password for 'https://oats4goats@github.com': ************

Moreover when I try to use credential-helper:

git config credential.helper store

it purges the .git-credentials file content instead of adding my credentials there. For me it looks like it doesn't take a user's input of the username/pass, but I don't know why...

At the same time git clone works just fine.

Thanks a lot for your help!

oats4goats
  • 71
  • 2
  • 6
  • For the credential helper part, could you ensure your remote url has your username in it? git remote set-url origin https://oats4goats@github.com/oats4goats/EloquentJS`. That way, the helper knows what user's password it is looking for. – VonC Mar 04 '15 at 09:29
  • 1
    Try to use ssh instead of https. – PJ Bergeron Mar 04 '15 at 09:33
  • 1
    @Pierre-JeanBergeron, I can't use SSH unfortunately... I have only http ports opened. – oats4goats Mar 04 '15 at 10:05
  • @VonC, like this it knows the username in advance but it still asks for the pass and gives the same 'anonymous access' error at the end. And .get-credentials is still empty. By the way, I was wondering if anybody can explain what's _netrc file and how it corresponds to .git-credentials file? Thanks. – oats4goats Mar 04 '15 at 10:09
  • @DimitryKozlov _netrc is used by curl, and not related to .git-credentials. See for instance http://stackoverflow.com/a/18362082/6309 – VonC Mar 04 '15 at 10:11
  • I even extended the original url to include the pass, but it doesn't work as well. Really weird... – oats4goats Mar 04 '15 at 10:44
  • GitHub offers SSH over the HTTPS ports: https://help.github.com/articles/using-ssh-over-the-https-port/ – nwinkler Mar 04 '15 at 11:56

0 Answers0