我一直在尝试将我的GitLab应用程序部署到Heroku,但是不幸的是,当我尝试运行时,我一直收到此错误 heroku login -i
Run `heroku login` to update your credentials, then retry the git command.
我从网上看过解决方案,但是似乎没有帮助。我要解决这个错误吗?
这是我的YML文件
before_script:
- echo "Running job..."
build_job_1:
script:
- heroku login -i
- blank
- XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX # Account token
- git remote add heroku https://heroku:[email protected]/redditchatbot.git
- git push heroku HEAD:master
谢谢您的帮助!
编辑:我已经包括下面的完整日志
Running with gitlab-runner 11.9.0-rc2 (227934c0)
on docker-auto-scale 0277ea0f
Using Docker executor with image ruby:2.5 ...
Pulling docker image ruby:2.5 ...
Using docker image sha256:e86557c9a8ab97ec7e9ba705f3e3411428b50d19d38643a0f52cb49faf735d3d for ruby:2.5 ...
Running on runner-0277ea0f-project-11711672-concurrent-0 via runner-0277ea0f-srm-1554580242-7d379f26...
Initialized empty Git repository in /builds/WillWam/reddump/.git/
Fetching changes...
Created fresh repository.
From https://gitlab.com/WillWam/reddump
* [new branch] master -> origin/master
Checking out f2d6762d as master...
Skipping Git submodules setup
$ echo "Running job..."
Running job...
$ git remote add heroku https://heroku:[email protected]/redditchatbot.git
$ git push heroku HEAD:master
remote: ! WARNING:
remote: ! Do not authenticate with username and password using git.
remote: ! Run `heroku login` to update your credentials, then retry the git command.
remote: ! See documentation for details: https://devcenter.heroku.com/articles/git#http-git-authentication
fatal: Authentication failed for 'https://heroku:[email protected]/redditchatbot.git/'
ERROR: Job failed: exit code 1
不要使用git使用用户名和密码进行身份验证
这意味着:不要在URL中使用heroku:XXXXX:heroku登录名应缓存您的凭据,这意味着您不需要URL中的所说凭据。
如果问题仍然存在,然后检查解决方案的一个“ ‘ git push heroku master
’仍然要进行身份验证”
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句