Skip to content
This repository has been archived by the owner on Apr 23, 2022. It is now read-only.

Commit

Permalink
Merge branch 'master' into issue-39
Browse files Browse the repository at this point in the history
  • Loading branch information
liafizan authored May 23, 2020
2 parents 8928e4a + 1b27b2a commit 26001c4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions repository/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ func GetAuth(repo *config.Repo) (transport.AuthMethod, error) {
Password: repo.Credentials.Password,
}
} else if len(repo.Credentials.PrivateKey.Key) > 0 {
if len(repo.Credentials.Username) == 0 {
repo.Credentials.Username = "git"
if len(repo.Credentials.PrivateKey.Username) == 0 {
repo.Credentials.PrivateKey.Username = "git"
}
auth, err = ssh.NewPublicKeysFromFile(repo.Credentials.PrivateKey.Username, repo.Credentials.PrivateKey.Key, repo.Credentials.PrivateKey.Password)
if err != nil {
Expand Down

0 comments on commit 26001c4

Please sign in to comment.