在Heroku上进行GitHub身份验证时无法连接到GitHub。

10
我在Heroku上创建了一个应用程序,但在认证到GitHub时出现了问题。
Error: remote was closed, authorization was denied, or an authentication message otherwise not received before the window closed..

怎么修复这个问题?

我得到了相同的错误 https://prnt.sc/tmrm3f - Yogi
2个回答

9

我也在 Google Chrome 中遇到了同样的错误。

错误:远程连接被关闭,授权被拒绝,或者窗口关闭之前未收到认证消息。

我尝试在 Chrome 的隐身模式下打开,结果成功。

另外,我也尝试了使用 Firefox,也没有问题!


如果在不同的浏览器和隐身模式下可以正常工作,那么这可能是一个cookie问题吗?例如,清除cookie就可以解决这个问题吗? - Jeremy Caney

4
我猜这是为了在Heroku上推送应用程序,如果是这样,您可以使用GitHub市场上的一个操作来完成: 您可以使用此链接:heroku deploy 在此之前,您需要将您的Heroku密钥设置为存储库设置中的secret,并按如下方式设置您的工作流程:
name: Deploy

on:
  push:
    branches:
      - master

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: akhileshns/heroku-deploy@v3.0.4 # This is the action
        with:
          heroku_api_key: ${{secrets.HEROKU_API_KEY}}
          heroku_app_name: "YOUR APP's NAME" #Must be unique in Heroku
          heroku_email: "YOUR EMAIL"
          buildpack: "SOME BUILDPACK" #OPTIONAL
          branch: "YOUR_BRANCH" #OPTIONAL and DEFAULT - 'HEAD' (a.k.a your current branch)
          dontuseforce: false #OPTIONAL and DEFAULT - false
          usedocker: false #OPTIONAL and DEFAULT - false
          appdir: "" #OPTIONAL and DEFAULT - "". This is useful if the api you're deploying is in a subfolder

我希望它有所帮助。


你好,我把它放在工作流程中,但是当我想要将Github与Heroku连接时,仍然出现错误。 - marc-stupid
你遇到了哪个错误? - Sarah Abderemane
1
我修复了它...那是我的错误...非常感谢您的答案,它真的帮助了我,我已经使用它部署了我的代码。 - marc-stupid

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接