老师我有跟别人一默一样的问题 运行deploy.sh时git和maven 报错 command not found
来源:13-9 服务端项目自动化发布、验证、故障排查与解决

a11847023
2018-03-06
这是别人的问题,问题一样的。https://coding.imooc.com/learn/questiondetail/31096.html 不运行时deploy.sh时git 和mvn都能用,我试了git --version git fetch, git pull, git status都能用,maven 的命令 mvn --version 也能用
不知道如何解决
3回答
-
神秘之耀
2020-11-04
已找到解决方法,大概是win系统创建的sh文件脚本编码问题 参考https://blog.csdn.net/u013626215/article/details/88050425?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.channel_param&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.channel_param
00 -
Geely
2018-03-09
你好,同学,这个是不是因为执行deploy.sh的用户权限造成的。如果和这个问题一样的话,有可能是权限的问题。你给予这个sh文件777权限再看看,sudo chmod 777 给予发布的shell脚本权限,再试试看。
00 -
polo哦
2018-03-08
你好同学~你也是像那个同学那样吗 git版本可以查到但是shell脚本执行失败吗
012018-03-08
相似问题