Repository that ends with ".git" is not cloned
Created by: mike-r-mclaughlin
- Sourcegraph version: 3.42.0, 3.42.1
- Reported by: https://github.com/sourcegraph/accounts/issues/3 , https://github.com/sourcegraph/accounts/issues/7485
Steps to reproduce:
-
Create a new repository in Bitbucket (GitHub will not allow you to create a repo that ends with .git it seems) called
test.git
-
Add this repository to Sourcegraph
Example
{
"url": "https://bitbucket.example.org",
"token": "REDACTED",
"username": "test",
"repos": [
"test/test.git",
"test/test-repository"
]
}
- Go to the Repository status page
Expected behavior:
Repository test.git is cloned and searchable
Actual behavior:
gitserver logs show:
17:58:04 gitserver | {"SeverityText":"WARN","Timestamp":1660586284538288671,"InstrumentationScope":"server.handleRepoUpdate","Caller":"server/server.go:912","Function":"github.com/sourcegraph/sourcegraph/cmd/gitserver/server.(*Server).handleRepoUpdate","Body":"error cloning repo","Resource":{"service.name":"gitserver","service.version":"3.42.1","service.instance.id":"127.0.0.1:3178"},"Attributes":{"repo":"bitbucket.example.org/test/test","error":"get VCS syncer: get repository: repo not found: name=\"bitbucket.example.org/test/test\""}}
/cc @jplahn @ryphil

