Skip to content

Commit f061040

Browse files
authored
fix: strip .git suffix (#28)
You can clone w/o `.git`, but since it's in the URL that GitHub provides in the "Clone" instructions for a repository, it is better to make that work here.
1 parent a9db997 commit f061040

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

  • cmd/git-credential-github-app-sts

cmd/git-credential-github-app-sts/main.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ func get(in []credentialAttribute) ([]credentialAttribute, error) {
7373
return nil, fmt.Errorf("missing path in credential input")
7474
}
7575

76+
path = strings.TrimSuffix(path, ".git")
77+
7678
resource := fmt.Sprintf("https://%s/%s", host, path)
7779

7880
ctx := context.Background()

0 commit comments

Comments
 (0)