Gitea: git pull,first 401,and then 200

Created on 10 Jul 2019  路  2Comments  路  Source: go-gitea/gitea

run git pull in client:

zdh@CSZX:/doc/xx> git pull
Already up-to-date.
zdh@CSZX:/doc/xx> 

gitea server log will show two, first is 401, and ok, why ??????

[Macaron] 2019-07-10 17:01:38: Started GET /dev/XData/info/refs?service=git-upload-pack for 10.114.14.174
[Macaron] 2019-07-10 17:01:38: Completed GET /dev/XData/info/refs?service=git-upload-pack 401 Unauthorized in 629.013碌s
[Macaron] 2019-07-10 17:01:38: Started GET /dev/XData/info/refs?service=git-upload-pack for 10.114.14.174
[Macaron] 2019-07-10 17:01:38: Completed GET /dev/XData/info/refs?service=git-upload-pack 200 OK in **88.473014ms**

can set to show one ?

kinquestion

Most helpful comment

If I'm not mistaken this is part of the HTTP authentication definition (https://en.wikipedia.org/wiki/Basic_access_authentication).
The server first responds with a 401 to notify the client that it needs to authenticate itself. The client then sends a second request with its credentials and receives a 200.
This also happens if you would navigate to that url with your browser, it would first show the 'auth popup'.

All 2 comments

If I'm not mistaken this is part of the HTTP authentication definition (https://en.wikipedia.org/wiki/Basic_access_authentication).
The server first responds with a 401 to notify the client that it needs to authenticate itself. The client then sends a second request with its credentials and receives a 200.
This also happens if you would navigate to that url with your browser, it would first show the 'auth popup'.

tks

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  路  3Comments

Fastidious picture Fastidious  路  3Comments

lunny picture lunny  路  3Comments

thehowl picture thehowl  路  3Comments

BRMateus2 picture BRMateus2  路  3Comments