當我運行 git 時,它會在終端上列印一些看起來與命令無關的奇怪文本。例如,使用git push:
$ git push
\S
Kernel on an
Everything up-to-date
我注意到只有當我的命令涉及遠程倉庫時才會發生這種情況。
這是一個錯誤嗎?我應該擔心什么?
以下是有關我的環境的一些附加資訊:
$ 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
uj5u.com熱心網友回復:
文本
\S
Kernel on an \S
幾乎可以肯定是為您推送到的服務器上的 ssh 守護行程配置的 ssh登錄前橫幅。它是在/etc/issue檔案中的服務器上定義的。
它似乎配置錯??誤,因為登錄橫幅可能旨在顯示如下內容:
Redhat blah blah blah
Kernel 2.6.11.12 on an i486
您可以通過直接通過 ssh 連接到服務器來驗證這一點,這或多或少是 @torek 建議的。
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/426175.html
標籤:混帐 SSH git-remote
