Skip to content

Commit 7ee53d2

Browse files
committed
fix(repos): nil key correct handling
1 parent 616d2a6 commit 7ee53d2

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

db_lib/GoGitClient.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ func (t ProgressWrapper) Write(p []byte) (n int, err error) {
3939
}
4040

4141
func (c GoGitClient) getAuthMethod(r GitRepository) (transport.AuthMethod, error) {
42+
if r.Repository.SSHKey == nil {
43+
return nil, nil
44+
}
45+
4246
switch r.Repository.SSHKey.Type {
4347
case db.AccessKeySSH:
4448

0 commit comments

Comments
 (0)