remote url detection can fail to detect github remotes
arcnmx opened this issue · 0 comments
arcnmx commented
git remote get-url
returns a modified url, as documented:
Configurations for insteadOf and pushInsteadOf are expanded here.
In some configurations, this may prevent detection of github remotes - changing the url from github.com
to a mirror or ssh HostName
alias. Some alternatives and suggestions are:
- use
git config --get remote.${remoteName}.url
instead of (or in addition to)remote get-url
- a
github.hosts
configuration setting (similar togitlab
) could help - however, the hostname will not actually be valid for use with the github API, so would only be for detection of github repos. - allow users to explicitly override the detection logic using
git config --get remote.${remoteName}.github_repo
andgithub_owner
or something