Skip to content
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

Why the extraneous default git urls? #133

Closed
oblitum opened this issue Dec 6, 2014 · 9 comments
Closed

Why the extraneous default git urls? #133

oblitum opened this issue Dec 6, 2014 · 9 comments
Labels

Comments

@oblitum
Copy link

oblitum commented Dec 6, 2014

Why use git urls like https://git::@github.com/mileszs/ack.vim.git for the repositories?
There're some personal repositories which I push directly from the plugins directory, but I have to change remote urls to standard for the push to work on GitHub, and then, change it back to this non-conventional url so that vim-plug doesn't think there's a problem with the plugin when I run :PlugUpdate.

@oblitum
Copy link
Author

oblitum commented Dec 6, 2014

By the way, thanks for the plugin, very nice! (although sometimes it struggles with some big plugins with long commit history, on my 1MB connection I have to clone them from terminal first, because vim-plug doesn't finish them and it keeps retrying)

@junegunn
Copy link
Owner

junegunn commented Dec 6, 2014

See: #109

It's a little trick to avoid username/password prompt from git when the repository doesn't exist. (Such thing can happen when there's a typo in the argument, or when the repository is removed from GitHub) It looks kind of silly, but doing so is the only way I know that works on various versions of git. If you're aware of a better way to handle this, please let me know.

As explained in the linked issue, there are two ways to override the default url pattern:

  1. Using full git url: Plug 'https://github.com/mileszs/ack.vim.git'
  2. Or define g:plug_url_format

(By the way, vim-plug will not complain even if you manually remove git:: part from the default url. See https://github.com/junegunn/vim-plug/blob/2ee153d/plug.vim#L1165-L1169)

Regarding the retrials, you might want to increase g:plug_timeout to a very large number so that it doesn't interrupt the process ever.

@oblitum
Copy link
Author

oblitum commented Dec 6, 2014

Thanks for all the info.

@oblitum
Copy link
Author

oblitum commented Dec 6, 2014

By the way, I'm not aware.

@junegunn
Copy link
Owner

junegunn commented Dec 6, 2014

Okay, thanks. It's something I've wanted to fix too. Too bad, there's no easy solution.
I think I should put this on the FAQ page.

@oblitum
Copy link
Author

oblitum commented Dec 6, 2014

Indeed, as it's a hack, I guess it's not well known, and may bring more duplicates like this one.

@oblitum
Copy link
Author

oblitum commented Dec 6, 2014

Regarding it not complaining even if git::@ is taken out of the standard http url... I've not tried it, since I generally use git urls (hence it complained). Would it be a good idea to make it not complain with the two kinds of url formats (git and http)?

@junegunn
Copy link
Owner

junegunn commented Dec 6, 2014

That's a possibility. Yeah, we know that the following two URLs are equivalent on GitHub,

But does the same apply to the other git servers as well? Is it possible that they use some different URL scheme? I don't know the answer though, but you see what I'm worried about.

I suggest that you use g:plug_url_format for the moment. Please check out the updated FAQ page.

https://github.com/junegunn/vim-plug/wiki/faq#whats-the-deal-with-git-in-the-url

@oblitum
Copy link
Author

oblitum commented Dec 6, 2014

Ok, I guess it has come the time for me to change my habits and adopt http urls for good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants