Search code examples
sshgit-lfs

stdin: is not a tty when running 'git push' - github over ssh


I am using Git on Windows and everything was working fine till recently.

In the last few days I have been getting an error when trying to push my local branch to remote on GitHub. I am connecting to GitHub via SSH. The error that I'm getting is

stdin is not a tty
error: failed to push some refs to 'github.com:xxx/yyy.git'

This happens regardless whether I try to push a new branch (without a remote) or an existing one. Both of those commands fail in the same way:

git push
git push -u origin tomasz/test

all other git commands seem to be working fine, i.e. git pull, fetch etc.

I have been googling for the last few days but couldn't find anything that would fix it

enter image description here

Update 1: I tried one of the solutions proposed by running pull --rebase ..., this is the outcome: enter image description here

Update:2 Git Trace failed ssh protocol connection gives error 14:49:50.463468 trace git-lfs: pure SSH protocol connection failed: Unable to negotiate version with remote side (unable to read capabilities): EOF enter image description here


Solution

  • thank you to @torek who gave me a way to get more detailed debugging logs GIT_TRACE=1 git push

    This has narrowed down the issue to be from Git-LFS, instead of GIT/Github/GitBash.

    I have fixed it by running: git lfs update --force as normal update was coming back with conflict errors