可以在 gitlab-ci 中使用 SSH 和 git 命令吗?
It' s possible to works SSH and git command in gitlab-ci?
在我的 gitlab-ci.yml 中,我有一个到另一台服务器的 SSH 连接,除了 git 命令
,我的所有命令都在工作
他们用消息阻止脚本:
WARNING: terminal is not fully functional
- (press RETURN)
我的脚本被屏蔽了
我在 gitlab-ci 中的代码:
allow_failure: false
script:
- ssh -tt root@1IP 'cd PATH; git branch;docker run -it -v $PWD:PATH -w /PATH cypress/included:6.5.0 | tee result.txt'
没有 git 命令,它的工作。
当然,在我的远程服务器中,git 分支工作正常。
有什么想法吗?
谢谢 :) :)
这是一条来自 less
, used as a pager by Git, 的错误消息。
尝试:
git config --global core.pager "less -d"; git branch; ... (rest of the commands)
-d
选项(来自 less
man page)选项抑制在终端为哑终端时通常显示的错误消息;
在我的 gitlab-ci.yml 中,我有一个到另一台服务器的 SSH 连接,除了 git 命令
,我的所有命令都在工作他们用消息阻止脚本:
WARNING: terminal is not fully functional
- (press RETURN)
我的脚本被屏蔽了
我在 gitlab-ci 中的代码:
allow_failure: false
script:
- ssh -tt root@1IP 'cd PATH; git branch;docker run -it -v $PWD:PATH -w /PATH cypress/included:6.5.0 | tee result.txt'
没有 git 命令,它的工作。
当然,在我的远程服务器中,git 分支工作正常。
有什么想法吗?
谢谢 :) :)
这是一条来自 less
, used as a pager by Git,
尝试:
git config --global core.pager "less -d"; git branch; ... (rest of the commands)
-d
选项(来自 less
man page)选项抑制在终端为哑终端时通常显示的错误消息;