-
根据提示
-
gitdir=$(git rev-parse —git-dir)
-
scp -p -P 29418 a04173@gerrit.casstime.net:hooks/commit-msg ${gitdir}/hooks/
-
-
gerrit生成change-id提示方法失效,subsystem request failed on channel 0 scp: Connection closed
- gitdir=$(git rev-parse —git-dir); scp -O -P xxx xxx@xxx:hooks/commit-msg ${gitdir}/hooks/
- try to use -O option with scp. This solved the same issue in my case with 9.0p1. It forces to use the legacy SCP protocol for file transfers instead of the SFTP protocol. Use of the SCP protocol may be necessary for servers that do not implement SFTP, for backwards-compatibility for particular filename wildcard patterns and for expanding paths with a ‘~’ prefix for older SFTP servers. Found here
个人笔记记录 2021 ~ 2025