New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fetch with url throws "not a valid remote name". #1488
Comments
It's not supposed to; you can't fetch with a URL. Set up a remote with that URL, then specify the remote name that you've configured. |
It is supported by libgit2 and I think it's nice feature cause I don't need to setup remote for one time operations. Of course you may not support it, but then it's probably better to change those confusing parameter names and descriptions: //
// Summary:
// Fetch from a url with a set of fetch refspecs
//
// Parameters:
// url:
// The url to fetch from
//
// refspecs:
// The list of resfpecs to use
//
// options:
// LibGit2Sharp.FetchOptions controlling fetch behavior
//
// logMessage:
// Message to use when updating the reflog.
public virtual void Fetch(string url, IEnumerable<string> refspecs, FetchOptions options, string logMessage); |
Really! I actually didn't know that. What's the API for this in libgit2? |
Ah sorry, my bad, I've mixed up the docs from git itself and libgit2. Then no complain, but the names still better to fix sometime. |
Okay, thanks for the clarification. I definitely agree with that. I'm going to reopen to make sure that we take care of that. Thanks! |
I just hit this error after an update, so I think this is something that LibGit2Sharp used to support. Looking through the history, I think it broke with #1288. The old version of But URLs contain slashes, and remote names may not contain slashes, so passing a URL to the native |
git remote add https-//github.com/Ranjanudt/LatestOfferScreen.git LatestOfferScreen just put (git remote add origin) after https link pastes it. |
Nothing much to tell, fetch with url is not working.
Example:
Exception:
InvalidSpecificationException: 'https://github.com/libgit2/libgit2sharp.git' is not a valid remote name.
The text was updated successfully, but these errors were encountered: