powershell 使用DPL部署到Heroku时,GitLab本地运行程序失败

tp5buhyn  于 2022-11-10  发布在  Shell
关注(0)|答案(1)|浏览(211)

几天前,我一直试图使用GitLab CI/CD通过Windows PowerShell上的本地GitLab运行程序将GitLab CI/CD部署到Heroku,但没有成功(作业日志片段如下):

Running with gitlab-runner 15.4.0 (43b2dc3d)
on R1 gYmo5ZZy
Resolving secrets
Preparing the "shell" executor
Using Shell executor...
Preparing environment
Running on DESKTOP-*******...
Getting source from Git repository
Fetching changes with git depth set to 20...
Reinitialized existing Git repository in C:/GitLab-Runner/builds/gYmo5ZZy/0/mernguys/learn-gitlab-ultimate-trial/.git/
Checking out 3f46edc0 as master...
Removing .dpl/
git-lfs/2.6.1 (GitHub; windows amd64; go 1.11.1; git dc072c3e)
Skipping Git submodules setup
Executing "step_script" stage of the job script
$ gem install dpl
Successfully installed dpl-1.10.16
Parsing documentation for dpl-1.10.16
Done installing documentation for dpl after 0 seconds
1 gem installed
$ dpl --provider=heroku --app=%HEROKU_APP_NAME% --api-key=%HEROKU_PRODUCTION_KEY%
Installing deploy dependencies
The system cannot find the path specified.
The system cannot find the path specified.
authentication succeeded
checking for app [MASKED]
found app [MASKED]
Cleaning up git repository with git stash --all. If you need build artifacts for deployment, set deploy.skip_cleanup: true. See https://docs.travis-ci.com/user/deployment#Uploading-Files-and-skip_cleanup.
No local changes to save
creating application archive
uploading application archive
`<?xml version="1.0" encoding="UTF-8"?> <Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>EN1C6ME3D2YG6HJ0</RequestId><HostId>Hhht2DwvnIyMCFazTLXrRer9I99Gxpaw2MHLwP/0ImlETnat5D2KIhsbO9ZckrSm8//JI99xlrQ=</HostId></Error>`curl: (6) Could not resolve host: application
curl: (6) Could not resolve host: version=3'
curl: (6) Could not resolve host: dpl
triggering new deployment
Channel is not registered.
curl: (6) Could not resolve host: application
curl: (6) Could not resolve host: version=3'
curl: (6) Could not resolve host: dpl
No stash entries found.
deploy failed
Preparing deploy
Deploying application
Cleaning up project directory and file based variables
ERROR: Job failed: exit status 1

当它到达“上传应用程序存档”步骤时,问题就会发生。任何帮助都将不胜感激。

ycl3bljg

ycl3bljg1#

在Windows上,curl可能会遇到问题with quotes meant for a Linux environment
在您的例子中,对GitLab运行器(installed through the relevant package)使用WSL2Linux环境可能更容易调试/使其运行。
如果您必须remove/re-login your Heroku application,也请选中。

相关问题