git scp: Connection closed

git 提交的时候,要求加入 changeID,推送失败的情况下,一般加入 命令行提示的内容即可。

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

但是可能是我同步远程仓库的时候,使用的是
image.png

第二个 而非第一个。
导致我一直推送不成功。
提示如下:

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 改成这样,实际测试,需要改成大写的O。

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 一、Git的概念: Git是Linus花了两周的时间用C语言编写的一个版本控制系统,它是目前世界上最先进的分布式版...
    天津的树懒阅读 399评论 0 0
  • 报错 $ gitdir=$(git rev-parse--git-dir);scp-p-P29418lianst@...
    Freedom之天下无双阅读 1,733评论 0 0
  • 一、基本概念: 注:对于git的分布式概念及其优点,不重复说明,自己百度或谷歌。本文中涉及到指令前面有$的,在cm...
    大厂offer阅读 1,456评论 0 3
  • 引用 感谢廖海峰老师的精彩文章文章出处https://www.liaoxuefeng.com/wiki/89604...
    学习ing兰阅读 230评论 0 0
  • Shell和vi shell 在计算机科学中,Shell俗称壳,用来区别于Kernel(核),是指“提供使用者使用...
    Yuann阅读 571评论 0 0