git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Git clone sends first an empty authorization header
@ 2016-03-05  4:51 Guilherme
  2016-03-05  5:50 ` Bryan Turner
  2016-03-05  8:47 ` Andreas Schwab
  0 siblings, 2 replies; 4+ messages in thread
From: Guilherme @ 2016-03-05  4:51 UTC (permalink / raw)
  To: git@vger.kernel.org

Hi,

When doing basic authentication using git clone by passing the
username and password in the url git clone will first send a GET
request without the authorization header set.

Am i seeing this right?

This means that if the counterpart allows anonymous cloning but not
pushing and the user provided a wrong usernam/password, it has two
options:

1. Allow the access and leave the user to figure out why he is not able to push.

2. Reply by setting the WWW-Authentication header and see if a
password/username is provided. This has the downside that if no
username and password is provided the user will still get a login
prompt for password and username. Upon entering twice nothing he will
still be able to clone. This can be confusing.

Can this behaviour of git clone (and I guess all the other parts that
do basic auth) be changed to provide the authentication header right
on the first request? Or am I doing/interpreting it wrong?

Thank you.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-03-05  8:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-05  4:51 Git clone sends first an empty authorization header Guilherme
2016-03-05  5:50 ` Bryan Turner
2016-03-05  6:16   ` Guilherme
2016-03-05  8:47 ` Andreas Schwab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).