为什么每次 运行 时 git 命令都会将“\S Kernel on an”推送到终端?

Why are git commands like push printing "\S Kernel on an" to the terminal each time i run them?

当我 运行 git 时,它正在向终端打印一些似乎与命令无关的奇怪文本。例如,使用 git push:

$ git push
\S
Kernel  on an 
Everything up-to-date

我注意到它只有当我的命令涉及远程仓库时才会发生。

这是一个错误吗?我应该担心什么?

以下是关于我的环境的一些附加信息:

$ echo [=13=] $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

正文

\S
Kernel  on an \S

几乎可以肯定是 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 文件。

它似乎配置错​​误,因为登录横幅可能旨在显示如下内容:

Redhat blah blah blah
Kernel 2.6.11.12 on an i486

您可以通过直接连接到服务器来验证这一点,这或多或少是@torek 建议的。