5 ms·
> I still get frustrated that I have to go and break my git configuration to enable ssh-based git clones and Just curious.. But why would you disable ssh-based
by starttoaster 3y ago
> I still get frustrated that I have to go and break my git configuration to enable ssh-based git clones and
Just curious.. But why would you disable ssh-based git authentication? It's significantly more convenient when interacting with private repositories than supplying a username and password to https git endpoints.
> set a bunch of environment variables for private repos.
Set up a private Go module proxy. Use something like Athens. The module proxy can handle authentication to your private module repositories itself, then you just add a line in your personal bashrc that specifies your proxy.
In general I don't have complaints with the things you take issue with so I'll digress on those.
- shakow 3y ago> But why would you disable ssh-based git authentication? Ask the Go developers. AFAIK the only package manager where I have to change my global git configuration to make it work. Even the venerable CPAN and tlmgr behave better. https://stackoverflow.com/questions/27500861/whats-the-proper-way-to-go-get-a-private-repository https://stackoverflow.com/questions/27500861/whats-the-prope...
- starttoaster 3y agoYeah, this isn't at all necessary. It might work for you but it's not how we accomplish the same thing. See my original comment for what we do.
- shakow 3y agoI'm sorry, but I didn't catch it; how exactly do you `go get` private github repos?
- okanat 3y ago> Just curious.. But why would you disable ssh-based git authentication? I don't disable it. However, not every git repo requires ssh to pull. When working with other languages, if there is a library that I purely depend on, it is perfectly okay to use https only and I use https. However to use private repos with Golang, one has to modify their global git configuration to reroute all https traffic into ssh because Golang's module system uses only https and the private repos are ssh-authenticated. There is no way to specify which repo is ssh and which repo is https. Last time I used Go, it was at 1.19. > Set up a private Go module proxy. Use something like Athens. The module proxy can handle authentication to your private module repositories itself, then you just add a line in your personal bashrc that specifies your proxy. Why should we put more things on our stack just to make a language, which claims to be modern, work? Why do we have to change the global configuration of a build server to make it work? Rust doesn't require this. Heck our Yocto bitbake recipes for C++ can do crazy things with url including automatically fetching the submodules. Maybe it would make sense to make that change if we used Go everyday but we don't.