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

Commit

Permalink
Merge pull request #14 from rampreeth/default-pk-username
Browse files Browse the repository at this point in the history
Set default username to git
  • Loading branch information
seanmalloy authored May 22, 2020
2 parents 842c5f8 + c183524 commit 1b27b2a
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 1b27b2a

Please sign in to comment.