Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"stdin: is not a tty" error on git pull

Tags:

git

I try to pull change from a remote repository but it doesn't work anymore.

When I type git pull and I enter the password, I'm still getting this stdin: is not a tty.

This is a screenshot:

enter image description here

like image 266
Nabil Lemsieh Avatar asked Feb 02 '15 16:02

Nabil Lemsieh


2 Answers

I had a similar issue while committing or pushing to github. See log:

$ git push
stdin is not a tty
error: failed to push some refs to https://...

I was able to fix the problem by upgrading the git hooks created by husky:

$ npx husky

I'm using the following versions:

  • git: 2.24.1.windows.2
  • husky: 4.0.0
  • mintty 3.1.0 (x86_64-pc-msys)

Related issues/pull-requests:

  • Issue: https://github.com/typicode/husky/issues/627
  • Pull request: https://github.com/typicode/husky/pull/634
like image 127
Tobias Weibel Avatar answered Oct 30 '22 10:10

Tobias Weibel


To fix this, add this to your .bashrc, before sourcing global /etc/.bashrc, so pretty much the top. This is especially for cpanel shared hosting.

# Prevent "stdin: is not a tty" errors
if [ $(expr index "$-" i) -eq 0 ]; then
    return
fi

Not only will the error disappear, you will then also see the output error.

like image 2
blamb Avatar answered Oct 30 '22 12:10

blamb