在 Windows gitlab runner 上使用 SCP 命令

Use SCP command on Windows gitlab runner

在我的 gitlab-ci.yml 中,我写道:

deploy:
    stage: build
    script:
        - scp target/ROOT.war user@host/data/temp

但是我的 Windows GitLab-ci runner 抛出一个错误:

scp is not recognized as an internal or external command

你知道是否可以将 scp 包添加到跑步者或类似的东西吗?

scp.exe 与任何 latest distribution of Git for Windows:

打包在一起
vonc@VONCAVN7 C:\Users\vonc
> where scp
D:\prgs\git\latest\usr\bin\scp.exe

如果您的 GitLab 代理在其 %PATH% 中有 <installation path of Git>/usr/bin,它将有 scp.

OP GGO details :

In fact I added the git /usr/bin path in system path var (and not user path var) and recreated my runner instead of using set command.
It works!