Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
c1c59843
Unverified
Commit
c1c59843
authored
Aug 14, 2021
by
Edward Thomson
Committed by
GitHub
Aug 14, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5972 from libgit2/ethomson/http_empty_password
http: don't require a password
parents
631ae5a6
28841241
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
src/transports/http.c
+6
-2
No files found.
src/transports/http.c
View file @
c1c59843
...
...
@@ -104,6 +104,11 @@ static int apply_url_credentials(
const
char
*
username
,
const
char
*
password
)
{
GIT_ASSERT_ARG
(
username
);
if
(
!
password
)
password
=
""
;
if
(
allowed_types
&
GIT_CREDENTIAL_USERPASS_PLAINTEXT
)
return
git_credential_userpass_plaintext_new
(
cred
,
username
,
password
);
...
...
@@ -138,8 +143,7 @@ static int handle_auth(
/* Start with URL-specified credentials, if there were any. */
if
((
allowed_credtypes
&
GIT_CREDENTIAL_USERPASS_PLAINTEXT
)
&&
!
server
->
url_cred_presented
&&
server
->
url
.
username
&&
server
->
url
.
password
)
{
server
->
url
.
username
)
{
error
=
apply_url_credentials
(
&
server
->
cred
,
allowed_credtypes
,
server
->
url
.
username
,
server
->
url
.
password
);
server
->
url_cred_presented
=
1
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment