You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using current install on mac or rather trying to get started!
running grm repos find local ... in my scenario gives me a lot of errors (most commonly when using bitbucket or Azure DevOps based repo's)
[!] /Users/asomerset/Repos/Innovation/repos/repo-name: Could not handle URL [email protected]:orgname/reponame. Reason: The remote URL starts with an unimplemented protocol
is the likely "failure" point from my reading of the code
if remote_url.starts_with("ssh://") {
return Ok(RemoteType::Ssh);
}
if git_regex.is_match(remote_url) && remote_url.ends_with(".git") {
return Ok(RemoteType::Ssh);
}
doesn't adequately cater for scenarios where there is no .git at the end of the remote_url and using ssh as the protocol without explicitly using ssh:// in the remote_url
If i manually edit a repo's remote_url in its .git/config (and likely also using the regular git remote commands to update to prefix ssh:// and then swap the : to a / after the hostname - so its a klunky workaround at best but it appears to work fine
I guess it would be fine for detect_remote_type() to be a bit more "forgiving" about the URLs. So anything like `{user}@{domain}:{repo} would be fine for SSH.
Something simple like: .+@.+:.+. I'd rather not have provider-specific matching here.
If you want to tackle this, just add a test case with your examples to the unit tests (here) and make them pass.
Hi There
using current install on mac or rather trying to get started!
running
grm repos find local ...
in my scenario gives me a lot of errors (most commonly when using bitbucket or Azure DevOps based repo's)upon delving into the source
git-repo-manager/src/repo.rs
Line 504 in f5750f1
doesn't adequately cater for scenarios where there is no .git at the end of the remote_url and using ssh as the protocol without explicitly using ssh:// in the remote_url
If i manually edit a repo's remote_url in its .git/config (and likely also using the regular
git remote
commands to update to prefix ssh:// and then swap the:
to a/
after the hostname - so its a klunky workaround at best but it appears to work fineperhaps some additional checks to look for either
[email protected]
or
<USER>@bitbucket.org
would help cover these edge cases although i wonder if other git repo providers have a similar case of not using .git at the end of remote_urls
maybe the test could be made more generic to cater for
<user>@<hostname>:
i haven't yet mapped out an appropriate regex for this but that might be a more generic fix
The text was updated successfully, but these errors were encountered: