Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Couldn't connect to GitHub while authenicating to github on heroku

I had created a app on heroku on authenticating to github it say

Error: remote was closed, authorization was denied, or an authentication message otherwise not received before the window closed..

How can i fix that

like image 416
Rishu Pandey Avatar asked May 25 '20 14:05

Rishu Pandey


People also ask

Why Heroku is not connecting to GitHub?

We are unable to access this connected repository on GitHub The authorization key is not valid, or the account used to connect to GitHub doesn't have access to the repository. Try disconnecting the repository above and then reconnect. That is the error I got when trying to connect my private GitHub repo to Heroku.

How do I connect my Heroku to GitHub?

Enabling GitHub Integration You can configure GitHub integration in the Deploy tab of apps in the Heroku Dashboard. To configure GitHub integration, you have to authenticate with GitHub. You only have to do this once per Heroku account. GitHub repo admin access is required for you to configure automatic GitHub deploys.

Can you push to Heroku and GitHub?

If you want to automatically push to heroku after committing to GitHub: you will need to use a continuous integration platform like TravisCI.

Is GitHub and Heroku same?

Heroku comes with it's own server so you can purchase hosting plan & deploy you web apps easily. In case of Github you need to purchase a separate server to host your web apps. Github is well known for contribution & collaboration & Heroku is for backend stack available for collaboration & deploying easily.


2 Answers

I was also facing the same error in Google Chrome.

Error: remote was closed, authorization was denied, or an authentication message otherwise not received before the window closed.`

I tried opening in Chrome's Incognito mode and it worked for me.

Again, I tried using Firefox and it also worked! 🎉

like image 75
Rajnish Anand Avatar answered Sep 30 '22 11:09

Rajnish Anand


I guess it's for pushing an app on heroku, so if it's that you can use a action on the GitHub marketplace to do so : You have this one : heroku deploy

You will have to set you heroku key in secrets on repository settings before and set your workflow just like this:

name: Deploy

on:
  push:
    branches:
      - master

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: akhileshns/[email protected] # 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

I hope it helps.

like image 42
Sarah Abderemane Avatar answered Sep 30 '22 12:09

Sarah Abderemane