无法在 Git Bash 中输入密码

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/13399315/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 07:45:18  来源:igfitidea点击:

Can't type password in Git Bash

gitbitbucketgit-bash

提问by Ehud Grand

I have a strange problem I couldn't find anything about on the web.

我有一个奇怪的问题,我在网上找不到任何相关信息。

I'm learning to use BitBucket and I'm following their walkthrough. I'm using Git Bash as the command prompt as they say here.

我正在学习使用 BitBucket,我正在关注他们的演练。我使用 Git Bash 作为命令提示符,正如他们在此处所说的那样。

Whenever I need to enter a password, e.g when cloning a repo, it simply refuses to get any input! I type on the keyboard, but nothing is shown on the screen. The only key it does accept is Enter, and then it says authorization fails because there's no password. I can't type it.

每当我需要输入密码时,例如在克隆 repo 时,它只是拒绝获取任何输入!我在键盘上打字,但屏幕上什么也没有显示。它接受的唯一键是 Enter,然后它说授权失败,因为没有密码。我打不出来

The strange thing is that I can type all other commands, just not this one. Any ideas?

奇怪的是,我可以键入所有其他命令,而不能键入这个命令。有任何想法吗?

回答by poke

You are typing the password, it just does not give you a visible reaction when entering characters (i.e. no *symbols). So just type your password correctly, press enter and it should work.

您正在输入密码,它只是在输入字符(即没有*符号)时不会给您明显的反应。所以只要正确输入密码,按回车键就可以了。

回答by QandA

There are a few things that can be your problem but first understand that the terminal does let you type your password it just doesn't let you see it for security reasons. Another thing that can fix it is if you are using any numbers in your password try using the keys at the top of the keyboard instead of the keypad. But keep in mind you will not be able to see any of what is going on.

有一些事情可能是您的问题,但首先要了解终端确实允许您输入密码,但出于安全原因不允许您看到它。可以解决的另一件事是,如果您在密码中使用了任何数字,请尝试使用键盘顶部的按键而不是小键盘。但请记住,您将无法看到正在发生的任何事情。

回答by EJ789

I use bitbucket a great deal. I notice that sometimes when I am cloning a very large repository I enter my password (which doesn't show) and then I press enter and then I have to wait for quite a while before anything will clone. A slow clone does tend to look like a hang. Try typing in your password, press enter, grab some coffee and come back. Works for me.

我经常使用 bitbucket。我注意到有时当我克隆一个非常大的存储库时,我输入我的密码(没有显示),然后我按 Enter,然后我必须等待很长时间才能克隆任何东西。缓慢的克隆确实看起来像挂起。尝试输入您的密码,按回车键,喝杯咖啡然后回来。对我来说有效。