在 Shell Runner 中卷曲上传文件
Curl Upload-File inside Shell Runner
我正在尝试通过 curl 从 gitlab 中上传单个文件-shell-运行ner.
基本上我需要使用这个命令:
curl --user <user:password> --insecure --upload-file <file> https://example.com
显示以下错误:
Invoke-WebRequest : A positional parameter cannot be found that accepts argument "<user:password>"
gitlab-ci中的这个运行我需要做哪些调整?
我已经尝试过为地址和不同的报价变量使用变量。
提前致谢!
如“Running cURL on 64 bit Windows”中所述,您是 运行 一个名为 Invoke-WebRequest
的 CmdLet
,它在 Powershell 中有一个 curl
别名。
从删除它开始:
Remove-item alias:curl
然后检查您的脚本是否确实调用了实际的 curl
命令(或者您可能需要 call it explicitly)。
或者:使用Invoke-WebRequest
(aliased 'curl
') with a .
我正在尝试通过 curl 从 gitlab 中上传单个文件-shell-运行ner.
基本上我需要使用这个命令:
curl --user <user:password> --insecure --upload-file <file> https://example.com
显示以下错误:
Invoke-WebRequest : A positional parameter cannot be found that accepts argument "<user:password>"
gitlab-ci中的这个运行我需要做哪些调整?
我已经尝试过为地址和不同的报价变量使用变量。
提前致谢!
如“Running cURL on 64 bit Windows”中所述,您是 运行 一个名为 Invoke-WebRequest
的 CmdLet
,它在 Powershell 中有一个 curl
别名。
从删除它开始:
Remove-item alias:curl
然后检查您的脚本是否确实调用了实际的 curl
命令(或者您可能需要 call it explicitly)。
或者:使用Invoke-WebRequest
(aliased 'curl
') with a