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

Asks for github password when I mistype plugin name #662

Closed
mgedmin opened this issue Nov 6, 2015 · 7 comments
Closed

Asks for github password when I mistype plugin name #662

mgedmin opened this issue Nov 6, 2015 · 7 comments

Comments

@mgedmin
Copy link
Contributor

mgedmin commented Nov 6, 2015

I wanted to install python_open_module.vim the other day, so I typed :PluginInstall python_open_module.vim.

I got a prompt Username for 'https://github.com': instead of a message that such a module doesn't exist (because it's actually :PluginInstall python_open_module without .vim).

@wsdjeg
Copy link
Contributor

wsdjeg commented Nov 6, 2015

hi the plugin show you this because it can not search it from github/vim-scripts,maybe it is exits in other people's repo ,so it want you type the usename

@gmarik
Copy link
Contributor

gmarik commented Nov 6, 2015

@mgedmin it's a bit tricky to detect that state… Any ideas are welcomed!

Possible workaround: poke with curl for 40X before running git clone

@mgedmin
Copy link
Contributor Author

mgedmin commented Nov 7, 2015

It's surprisingly hard to discover how to ask git not to ask for passwords (Google failed me, git's man pages for clone/fetch also), but I discovered one way that works:

$ git clone https://github.com/nosuch/repo
Cloning into 'repo'...
Username for 'https://github.com': ^C

$ GIT_ASKPASS=true git clone https://github.com/nosuch/repo
Cloning into 'repo'...
remote: Repository not found.
fatal: Authentication failed for 'https://github.com/nosuc/repo/'

GIT_ASKPASS is documented in gitcredentials(7) and git-config(1).

On non-POSIX systems you'd probably have to find some other binary that exits without an error and doesn't produce any output. Although perhaps the Git for Windows distribution ships a true.exe in its copy of Mingw? It ships a bash, so why not true?

@wsdjeg
Copy link
Contributor

wsdjeg commented Nov 7, 2015

i can not understande what you want!
if you want git push without type the passward,i think you should add

[credential] 
helper = store

to ~/.gitconfig

@mgedmin
Copy link
Contributor Author

mgedmin commented Nov 7, 2015

I want :PluginInstall something-that-does-not-exist to tell me such a plugin doesn't exist, instead of asking for my GitHub username and password..

@gmarik
Copy link
Contributor

gmarik commented Nov 7, 2015

GIT_ASKPASS is documented in gitcredentials(7) and git-config(1).

@mgedmin great find!

You can do let $GIT_ASKPASS='true' in .vimrc and it should not ask pass anymore.

Let me know how it works for you!

@gmarik
Copy link
Contributor

gmarik commented Nov 7, 2015

@mgedmin: created #667 to implement it.

Closing this issue. Thank you!

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

No branches or pull requests

3 participants