qt 利用git http而不是ssh提交时,
报错1:
error: cannot run ssh-askpass: 没有那个文件或目录
The command "/usr/bin/git" terminated with exit code 128.
fatal: could not read Username for 'http://192.168.3.13:8081': 没有那个设备或地址
解决办法:
sudo apt-get install ssh-askpass
利用http而不是ssh提交时,需要每次需要提交用户名和密码
解决办法:
执行 git config --global credential.helper store
在输入一次用户名密码即可全局使用
报错2:
fatal: protocol 'https' is not supported
原因:
使用直接粘贴时会在Git Bash 中添加一个隐藏的符号 ^?。
当你在粘贴仓库链接时使用了CTRL +V后
在GIt Bash 中你的克隆语句可能显示是这样正常的:
git clone https://gitee.com/qianfanguojin/homework_1.git
但真实语句其实是这样的:
git clone ^?https://gitee.com/qianfanguojin/homework_1.git
链接前面多了符号,协议变成了^https,肯定不能克隆成功,提示协议不支持。
解决办法
1:手打链接地址
2:将从其他地方粘贴的地址放入记事本或notepad++ 重新粘贴过来即可