Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Asking for password on git 1.7 #56

Closed
matze opened this issue Aug 13, 2014 · 7 comments
Closed

Asking for password on git 1.7 #56

matze opened this issue Aug 13, 2014 · 7 comments

Comments

@matze
Copy link

matze commented Aug 13, 2014

I wanted to install plugins on a slightly older machine with Git 1.7.7 and Vim 7.3 (+ruby). For some reason, vim-plug tries to clone URLs like https://git:@github.com/Shougo/neosnippet.git. This looks to me like trying to clone with user "git:" but you seem to have a reason to construct the URL like that. Anyway, that breaks for me because I cannot type in passwords and Vim gets locked up.

P.S.: Replacing that URI with plain 'https://github.com/' ... solves the problem.

@junegunn
Copy link
Owner

Hi, thanks for pointing out the issue.

The git: prefix was introduced to workaround the problem where git asks for username when the repository doesn't exist, for example

> git clone https://github.com/tpope/vim-tpope.git
Cloning into 'vim-tpope'...
Username for 'https://github.com':

> git clone https://git:@github.com/tpope/vim-tpope.git
Cloning into 'vim-tpope'...
error: Could not resolve host: github.com while accessing https://git:@github.com/tpope/vim-tpope.git/info/refs?service=git-upload-pack
fatal: HTTP request failed

Hmm, maybe we could change the prefix to something like git:git. I currently don't have git 1.7.7 installed, could you check if git clone https://git:git@github.com/tpope/vim-tpope.git doesn't ask for anything?

@matze
Copy link
Author

matze commented Aug 13, 2014

That seems to work:

$ git clone https://git:git@github.com/tpope/vim-tpope.git
Cloning into vim-tpope...
error: The requested URL returned error: 403 while accessing https://git:git@github.com/tpope/vim-tpope.git/info/refs

fatal: HTTP request failed

$ git clone https://git:@github.com/tpope/vim-tpope.git
Cloning into vim-tpope...
Password: ^C

@junegunn
Copy link
Owner

Thanks, how about git clone https://git::@github.com/tpope/vim-tpope.git? Does this work as well? (looks less silly than git:git I think)

If it works, we can easily fix this issue by putting a dummy password after :. But before doing that, I'd like to investigate if there's a better way of handling this.

@junegunn junegunn changed the title Wrong clone URL Asking for password on git 1.7 Aug 13, 2014
@junegunn
Copy link
Owner

Okay, I downloaded git 1.7.8 and checked git:: also works.

@matze
Copy link
Author

matze commented Aug 13, 2014

Same for 1.7.7.

@junegunn
Copy link
Owner

I decided to change the prefix to git::. The change is backward-compatible.
Could you update and check if it resolves the problem?

@matze
Copy link
Author

matze commented Aug 14, 2014

It resolved the issue, thank you very much.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants