Skip to content

git clone throught apt-cacher-ng does not work : The requested URL returned error: 403

Hi,

The proxy is using apt-cacher-ng v3.3.1-2build1 :

$ dpkg -s apt-cacher-ng | grep Version:
Version: 3.3.1-2build1

On another Linux, I trying to do a git clone :

$ GIT_CURL_VERBOSE=1 GIT_TRACE=1 git clone http://X.Y.Z.T/HTTPS///github.com/mjg59/mei-amt-check
16:15:14.122008 git.c:418               trace: built-in: git clone http://X.Y.Z.T/HTTPS///github.com/mjg59/mei-amt-check
Cloning into 'mei-amt-check'...
16:15:14.126956 run-command.c:643       trace: run_command: git-remote-http origin http://X.Y.Z.T/HTTPS///github.com/mjg59/mei-amt-check
* Expire in 0 ms for 6 (transfer 0x565270b03660)
* Couldn''t find host X.Y.Z.T in the .netrc file; using defaults
*   Trying X.Y.Z.T...
* TCP_NODELAY set
* Expire in 200 ms for 4 (transfer 0x565270b03660)
* Connected to X.Y.Z.T (X.Y.Z.T) port 80 (#0)
> GET /HTTPS///github.com/mjg59/mei-amt-check/info/refs?service=git-upload-pack HTTP/1.1
Host: X.Y.Z.T
User-Agent: git/2.20.1
Accept: */*
Accept-Encoding: deflate, gzip
Accept-Language: en-US, en;q=0.9, *;q=0.8
Pragma: no-cache

< HTTP/1.1 403 Forbidden file type or location
< Content-Length: 161
< Content-Type: text/html
< Date: Thu May  4 13:51:37 2023
< Server: Debian Apt-Cacher NG/3.3.1
< Connection: Keep-Alive
<
* Connection #0 to host X.Y.Z.T left intact
fatal: unable to access 'http://X.Y.Z.T/HTTPS///github.com/mjg59/mei-amt-check/': The requested URL returned error: 403
$ echo $?
128

Can you help ?

Edited by SebM