Skip to content

Commit bc28ad5

Browse files
authored
Merge pull request #794 from aryan9600/fix-bitbucket-auth
2 parents 7c07b7a + 7a708ac commit bc28ad5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/git/libgit2/managed/http.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ func createClientRequest(targetURL string, action git2go.SmartServiceAction,
279279

280280
// Apply authentication and TLS settings to the HTTP transport.
281281
if authOpts != nil {
282-
if len(authOpts.Username) > 0 {
282+
if authOpts.Username != "" && authOpts.Password != "" {
283283
req.SetBasicAuth(authOpts.Username, authOpts.Password)
284284
}
285285
if len(authOpts.CAFile) > 0 {

0 commit comments

Comments
 (0)