git pull,first 401,and then 200 #3563

Closed
opened 2025-11-02 05:17:25 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @imamong on GitHub (Jul 10, 2019).

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 ?

Originally created by @imamong on GitHub (Jul 10, 2019). 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 ?
GiteaMirror added the type/question label 2025-11-02 05:17:25 -06:00
Author
Owner

@ardentsword commented on GitHub (Jul 10, 2019):

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'.

@ardentsword commented on GitHub (Jul 10, 2019): 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'.
Author
Owner

@imamong commented on GitHub (Jul 17, 2019):

tks

@imamong commented on GitHub (Jul 17, 2019): tks
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#3563