1

I run bat for git I write

git checkout master
git add .
git pull
pause

http://postimg.org/image/piy9vwxvd/

and when I got to the part I need to fill the password is stuck I cant write anything.

How can I fix it?

2
  • 6
    Did you try just typing the password and pressing enter? Unix systems are known for hiding the password by not displaying anything when typing it (essentially making it look like it doesn't work when no characters appear). Commented Nov 25, 2015 at 15:02
  • I'm facing the same issue. I'm pasting the password using Ctrl+Shift+v or by right click > paste. It automatically goes to another line and say invalid. But it works fine when I use some graphics tool like git gui. However, it doesn't solve my problem completely. Commented Mar 18, 2019 at 10:18

1 Answer 1

1

You can work around this, by caching your password. Therefore you have to options:

Option 1: Caching your credentials

git config --global credential.helper cache

Because I assume your OS is windows, you should use wincred instead:

git config --global credential.helper wincred

Then you can set a timeout (default is 15 minutes), to surpress the password-request for at least one hour:

git config --global credential.helper --timeout=3600

That means, before running your batch-file, you have to manually git pull (or something else, that requires entering your passphrase). Then, the passphrase is cached for an hour.

Option 2: Storing your credentials

You use a credentials file to store your credentials by running this. But be aware, that this method stores your data as plain text on your filesystem:

git config --global credential.helper store --file ~/.credentials-file

You will find more information on this topic in the git docs.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.