When using github.com, the url used to browse to a repo does not contain the .git extension:
but the "clone with https" url does:
And you go get it like this:
go get github.com/someuser/helloworld
In our private git repo, we create bare repos in a directory ending in .git (based on convention):
- helloworld.git
But the url (served using https://github.com/klaussilveira/gitlist) to browse to the repo also contains .git:
This causes go get to fail because it doesn't expect the .git:
C:\>go get -u -f -insecure git.test.net/helloworld.git
# cd .; git clone git.test.net/helloworld C:\Temp\golang\src\git.test.net\helloworld.git
fatal: repository 'git.test.net/helloworld' does not exist
package git.test.net/helloworld.git: exit status 128
Leaving off the .git part also fails:
C:\>go get -u -f -insecure git.test.net/helloworld
package git.test.net/helloworld: unrecognized import path "git.test.net/helloworld" (parse https://git.test.net/helloworld?go-get=1: no go-impor
t meta tags ())
Renaming the bare repo to just helloworld solves the problem. But this isn't the convention.
What am I missing? Is there a server setting we are missing so that we can leave off the .git extension when browsing? Should we just just leave off .git when naming the bare repo? Why does github.com have different behavior?