curl
seems to work fine, but git
does not. git
asks for a password, but then doesn't send any credentials.
Works: curl --netrc http://test.git.unsw.edu.au/
and curl -u username:password http://test.git.unsw.edu.au/
Doesn't work: git remote update
Password for 'http://username@test.git.unsw.edu.au':
* Couldn't find host test.git.unsw.edu.au in the .netrc file; using defaults
User-Agent: git/1.7.9.5
Host: test.git.unsw.edu.au
Accept: */*
Pragma: no-cache
Why isn't git
sending credentials?
From an strace, I see:
- Read
.netrc
GET /repo/info/refs?service=git-receive-pack HTTP/1.1
- no credentialsHTTP/1.0 401 Unauthorized
- Read
.netrc
GET /repo/info/refs?service=git-receive-pack HTTP/1.0
- no credentialsHTTP/1.0 401 Unauthorized
- Prompt for password
- Read
.netrc
* Couldn't find host test.git.unsw.edu.au in the .netrc file; using defaults
GET /repo/info/refs?service=git-receive-pack HTTP/1.1
- no credentialsHTTP/1.0 401 Unauthorized