Merge pull request #794 from aryan9600/fix-bitbucket-auth

This commit is contained in:
Hidde Beydals 2022-06-23 11:44:59 +02:00 committed by GitHub
commit bc28ad5d1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -279,7 +279,7 @@ func createClientRequest(targetURL string, action git2go.SmartServiceAction,
// Apply authentication and TLS settings to the HTTP transport.
if authOpts != nil {
if len(authOpts.Username) > 0 {
if authOpts.Username != "" && authOpts.Password != "" {
req.SetBasicAuth(authOpts.Username, authOpts.Password)
}
if len(authOpts.CAFile) > 0 {