When I run git, it is printing some odd text to the terminal that seems unrelated to the command. For example, with git push
:
$ git push
\S
Kernel on an
Everything up-to-date
I've noticed it only happens when my commands involve the remote repo.
Is this a bug? Something I should worry about?
Here is some additional information about my environment:
$ echo $0 $SHELL
-zsh /bin/bash
$ git --version
git version 2.35.1
$ git status
On branch master
Your branch is up to date with 'origin/master'.
nothing to commit, working tree clean
$ git remote -vv
origin <redacted>:<redacted>.git (fetch)
origin <redacted>:<redacted>.git (push)
$ git push --verbose
Pushing to <redacted>:<redacted>.git
\S
Kernel on an
To <redacted>:<redacted>.git
= [up to date] master -> master
updating local tracking ref 'refs/remotes/origin/master'
Everything up-to-date
$ ls -1 .git/hooks
applypatch-msg.sample
commit-msg.sample
fsmonitor-watchman.sample
post-update.sample
pre-applypatch.sample
pre-commit.sample
pre-merge-commit.sample
pre-push.sample
pre-rebase.sample
pre-receive.sample
prepare-commit-msg.sample
push-to-checkout.sample
update.sample
$ cat .git/hooks/*push
zsh: no matches found: .git/hooks/*push
$ which git
/usr/local/bin/git
$ file /usr/local/bin/git
/usr/local/bin/git: Mach-O 64-bit executable x86_64
CodePudding user response:
The text
\S
Kernel on an \S
is almost certainly the ssh pre-login banner configured for the ssh daemon on the server you are pushing to. It is defined on the server in the /etc/issue
file.
It appears to be misconfigured, as the login banner is probably intended to show something like:
Redhat blah blah blah
Kernel 2.6.11.12 on an i486
You can verify this by ssh'ing to the server directly, which is more or less what @torek suggested.