git scp: Connection closed

git 提交的時候,要求加入 changeID,推送失敗的情況下,一般加入 命令行提示的內(nèi)容即可。

gitdir=$(git rev-parse --git-dir); scp -p -P 29418 chenpengsheng@app.kalerm.com:hooks/commit-msg ${gitdir}/hooks/

但是可能是我同步遠(yuǎn)程倉庫的時候,使用的是
image.png

第二個 而非第一個。
導(dǎo)致我一直推送不成功。
提示如下:

remote: Resolving deltas: 100% (10/10)
remote: Processing changes: refs: 1, done
remote: ERROR: commit 9991391: missing Change-Id in message footer
remote:
remote: Hint: to automatically insert a Change-Id, install the hook:
remote:   gitdir=$(git rev-parse --git-dir); scp -p -P 29418 chenpengsheng@app.kalerm.com:hooks/commit-msg ${gitdir}/hooks/
remote: and then amend the commit:
remote:   git commit --amend --no-edit
remote: Finally, push your changes again
remote:


 gitdir=$(git rev-parse --git-dir); scp -p -P 29418 chenpengsheng@app.kalerm.com:hooks/commit-msg ${gitdir}/hooks/
subsystem request failed on channel 0
scp: Connection closed

百度說要把

 gitdir=$(git rev-parse --git-dir); scp -O -P 29418 chenpengsheng@app.kalerm.com:hooks/commit-msg ${gitdir}/hooks/

scp -O 改成這樣,實(shí)際測試,需要改成大寫的O。

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

  • 一、Git的概念: Git是Linus花了兩周的時間用C語言編寫的一個版本控制系統(tǒng),它是目前世界上最先進(jìn)的分布式版...
    天津的樹懶閱讀 473評論 0 0
  • 報(bào)錯 $ gitdir=$(git rev-parse--git-dir);scp-p-P29418lianst@...
    Freedom之天下無雙閱讀 1,820評論 0 0
  • 一、基本概念: 注:對于git的分布式概念及其優(yōu)點(diǎn),不重復(fù)說明,自己百度或谷歌。本文中涉及到指令前面有$的,在cm...
    大廠offer閱讀 1,559評論 0 3
  • 引用 感謝廖海峰老師的精彩文章文章出處https://www.liaoxuefeng.com/wiki/89604...
    學(xué)習(xí)ing蘭閱讀 264評論 0 0
  • Shell和vi shell 在計(jì)算機(jī)科學(xué)中,Shell俗稱殼,用來區(qū)別于Kernel(核),是指“提供使用者使用...
    Yuann閱讀 680評論 0 0

友情鏈接更多精彩內(nèi)容