rakudo / star

Rakudo Star (Raku distribution)
https://rakudo.org/
Artistic License 2.0
265 stars 41 forks source link

(non-critical but trivially fixed) Some modules unnecessarily require an authenticated connection #120

Closed ChoHag closed 5 years ago

ChoHag commented 6 years ago

By using git@github.com rather than git://github.com, git calls ssh which attempts to use the key in ~/.ssh to authenticate with github (if there is one).

Ordinarily not a problem unless the key requires a password and isn't already added to the ssh agent, which was the case here; I would have been prompted to authenticate for nearly half of the modules.

s|git@|git://| on .gitmodules solves that locally but I don't know how that plays with push/clone/pull. Probably there's a more git-aware way to do it.

Leont commented 5 years ago

git allows you to rewrite urls. I haven't tested it (my configuration is exactly the other way around), but I think you want this in your ~/.gitconfig:

[url "git://github.com/"]
    insteadOf = git@github.com:
clarkema commented 5 years ago

Standardised on git:// in the .gitmodules file. If you already have a checkout, you'll still have git@ versions in your .git/config... that shouldn't hurt anything, but if you want to update them you can just run git submodule sync to bring your .git/config up to date.