【问题标题】:Heroku failed to connect using JenkinsHeroku 无法使用 Jenkins 进行连接
【发布时间】:2018-06-15 21:28:54
【问题描述】:

我有一个当前部署到 Heroku 的应用程序,我正在尝试连接到 Jenkins,但我收到了这个错误

ERROR: Error fetching remote repo 'Heroku'
hudson.plugins.git.GitException: Failed to fetch from https://git.heroku.com/myApp.git
    at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:862)
    at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1129)
    at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1160)
    at hudson.scm.SCM.checkout(SCM.java:495)
    at hudson.model.AbstractProject.checkout(AbstractProject.java:1276)
    at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:560)
    at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:485)
    at hudson.model.Run.execute(Run.java:1735)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    at hudson.model.ResourceController.execute(ResourceController.java:97)
    at hudson.model.Executor.run(Executor.java:405)
Caused by: hudson.plugins.git.GitException: Command "git fetch --tags --progress https://git.heroku.com/myApp.git +refs/heads/*:refs/remotes/Heroku/*" returned status code 128:
stdout: 
stderr: 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://git.heroku.com/myApp.git/'

我已经运行了heroku login,当我运行heroku apps --all 时,它会列出我当前的所有应用程序和我的用户名,确认登录成功

【问题讨论】:

    标签: git amazon-web-services jenkins heroku deployment


    【解决方案1】:

    这取决于您的 Jenkins 运行的是哪个登录/本地帐户。

    如果它不是使用 same 帐户运行,它不会从您成功的heroku login 命令中受益。

    【讨论】:

    • 对不起,我想我迷路了。如何查看我的 Jenkins 关联到哪个 Heroku 帐户?
    • @Naji 这不是关于 heroku 帐户,而是关于用于运行 Jenkins 本身的本地用户帐户。除非一切都在 AWS 实例上运行,否则我意识到阅读您已删除的问题 stackoverflow.com/q/48123800/6309
    • 哦,是的,我现在记得,Jenkins 创建了一个本地用户帐户...你知道我如何在 AWS 中访问它吗?或者你可以指导我在哪里找到?
    • @Naji 实际上,为什么不创建第一个工作,其唯一步骤是进行 heroku 登录:这将保持本地 Jenkins 帐户的登录。那么你的其他工作可能会成功。
    • 如果你不忙,你会和我聊天吗?
    猜你喜欢
    • 2023-03-04
    • 1970-01-01
    • 1970-01-01
    • 2019-01-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-12-22
    • 2022-01-26
    相关资源
    最近更新 更多