Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git pull,first 401,and then 200 #7412

Closed
imamong opened this issue Jul 10, 2019 · 2 comments
Closed

git pull,first 401,and then 200 #7412

imamong opened this issue Jul 10, 2019 · 2 comments
Labels
type/question Issue needs no code to be fixed, only a description on how to fix it yourself.

Comments

@imamong
Copy link

imamong commented 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 ?

@ardentsword
Copy link

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

@lunny lunny added the type/question Issue needs no code to be fixed, only a description on how to fix it yourself. label Jul 10, 2019
@imamong
Copy link
Author

imamong commented Jul 17, 2019

tks

@imamong imamong closed this as completed Jul 17, 2019
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/question Issue needs no code to be fixed, only a description on how to fix it yourself.
Projects
None yet
Development

No branches or pull requests

3 participants