windows下GitLab操作:PTY allocation request failed on channel 0

公司代码放在了GitLab上,准备上传一个项目代码,操作参考:

https://blog.****.net/qq_20663229/article/details/80413188

提交代码时遇到了问题,通过百度解决了几个,最后卡在这样的两个报错上:

fatal: Could not read from remote repository

PTY allocation request failed on channel 0

过程截图1:

windows下GitLab操作:PTY allocation request failed on channel 0

过程截图2:

windows下GitLab操作:PTY allocation request failed on channel 0

解决办法,参考:

https://*.com/questions/13509293/git-fatal-could-not-read-from-remote-repository/56264790#56264790

I had this problem using gitbash on windows 10. I tried several things to solve this problem, the major ones being these:

  1. Recreated my ssh keys and updated to bitbucket. Didn't help
  2. Turned on debugging using this and found out that I was getting "shell request failed on channel 0" as asked here
  3. Rebooted my windows PC

None of the above helped. I ended up re-installing Git for windows This took only a few minutes as compared to other things I did and it solved the problem!

按照上述步骤重装了Git解决问题,安装时我选择的是OpenSSH,是否跟这个相关不是很清楚:

windows下GitLab操作:PTY allocation request failed on channel 0