Pushing App to Heroku Problem

Heroku - Error during git push/deployment, The same version of this code has already been built

After some few tries, I was thinking that the cause of the problem was maybe an interrupted git push heroku master command, which was then proceeded by a re-execution of the same command, causing the error below:

remote:  !     Push failed
remote: !
remote: ! ## Warning - The same version of this code has already been built: 31199a7acec03a3cb614ebaaf6c7720cee6684bd
remote: !
remote: ! We have detected that you have triggered a build from source code with version 31199a7acec03a3cb614ebaaf6c7720cee6684bd
remote: ! at least twice. One common cause of this behavior is attempting to deploy code from a different branch.
remote: !

So what I did was, I pushed another commit, then retried the same command git push heroku master, which resulted to a successful deployment.

Also, shoutout to RainXCat's answer and insights, now I know Heroku does not allow two git repositories on the same directory/folder.

Problems with Git Push Heroku Master - No Longer Working

SOLUTION:

$ heroku git:remote -a <app-name>
...obviously is the actual name of my app.

I missed the announcement of this last year? I'm surprised I was able to push to heroku as long as I did.

From Heroku help:

Could you please switch your heroku remote to the HTTPS URL?

As has been announced last year, the platform no longer accepts git pushes at an SSH remote. Could you please run commands like below to switch the heroku remote to the HTTPS URL?

$ heroku git:remote -a <app-name>

Regards,
Daigo

Then I should see:

$ git remote -v | grep heroku
heroku https://git.heroku.com/<app-name>.git (fetch)
heroku https://git.heroku.com/<app-name>.git (push)

again, <app-name> is the actual name of my app.

Thanks for looking

Heroku and GitHub: Items could not be retrieved, Internal server error

This is due to an issue reported at their status portal, here.

For now, the solution is to use another pushing strategy.

The best one, for now, is using their remote with Heroku CLI. The steps for it are:

1. Install the Heroku CLI if not yet installed

Further information about installation and setup can get here

2. Perform login with the heroku login command

You will be prompted with your default browser window for completing the login at the Heroku portal.

3. Assuming you already have your app set up at Heroku (if not, please follow this), you just need to add a new remote for your Git repository with Heroku CLI.

Run heroku git:remote -a example-app - substitute "example-app" with your app name.

4. git remote -v to check if the remote has been set successfully

You should see something like this appear as a response:

heroku  https://git.heroku.com/your-app-name.git (fetch)
heroku https://git.heroku.com/your-app-name.git (push)

5. Push your branch to the new heroku remote

git push heroku your_branch_name

6. You should see the progress of your deployment being displayed in the terminal


The reference for this answer has been taken from here, which can also be used if further information other than the one provided in this answer is needed.

H14 Error regarding favicon when deploying Django app to Heroku

SOLVED!

Had moved Procfile to root but had not pushed this change to Git repo and so Heroku could not establish the presence of the file, hence error.



Related Topics



Leave a reply



Submit