I'm trying to connect my heroku app to git repository.And also I can't able to push an existing repository with heroku app.While I'm trying to push with
git push heroku master
I found
fatal: 'heroku' does not appear to be a git repository
fatal: Could not read from remote repository.
How can I solve this?
If you already have the heroku app and want to connect it you can use the cli to list your apps heroku apps
=== name#email.com Apps
app_name
app_name_2
Then connect it with can use heroku git:remote -a app_name as well
From this question: How to connect to the selected app with heroku CLI
It is worth noting that this does basically the same thing as creating the remote as #rdegges suggested.
You can check to make sure you are
In the correct (git) directory and have cloned it down
Have the heroku remote to push to
By running git remote -v, should look something like this:
heroku https://git.heroku.com/app_name.git (fetch)
heroku https://git.heroku.com/app_name.git (push)
origin git#ssh.route/app_name.git (fetch)
origin git#ssh.route/app_name.git (push)
Found a very well thought out and thorough answer to heroku in general here: https://stackoverflow.com/a/5129733/5491808
That error means that: in your current project you have not yet 'initialized' Heroku.
Are you creating a NEW Heroku app? If so, you can run the following command to fix things:
heroku create
If you're trying to work with an EXISTING Heroku app, you need to setup your 'heroku remote' by doing the following:
git remote add heroku https://git.heroku.com/your-app-name.git
In order to connect with Heroku from anywhere you need these 3 files-
File name Procfile ( generic file - no file extension)
File name runtime.txt
File name requirements.txt
For details github link
(please fork it & give me a star)
Related
Been trying to deploy my python selenium code to Heroku but I keep running into this issue:
--
Terminal command:
heroku ps:scale bot=1
Output:
ยป Warning: heroku update available from 7.53.0 to 7.59.2.
Scaling dynos... !
! Couldn't find that process type (bot).
Procfile:
bot: python sfkafskafne.py
(Pycharm)
I'm deploying attempting to deploy to Heroku using the PyCharm terminal with the command above
I'm deploying attempting to deploy to Heroku using the PyCharm terminal with the command above
None of the commands in your post deploy your code. heroku ps:scale scales dynos for code that has already been deployed.
Before you scale your dynos, you need to get your code onto Heroku by deploying it. You can do so via git push, GitHub integration, or Docker.
The first two options require that your code be committed to a Git repository. That's a good idea anyway, even if you choose to use Docker deployment.
For the first option, something like this should get you going:
Change to the project directory with cd INSTTTAAAAA
Create a Git repository with git init
Commit your code with git add . followed by git commit -m "Initial commit"
Add a remote with heroku git:remote
Push your code with git push heroku main
Beyond this, I suggest you read the documentation I linke to above. There's lots more to learn that's beyond the scope of a SO question.
You will also want to push your code to GitHub or similar as well. Heroku is not meant to be your primary source code repository.
Side note: I'm not sure if INSTTTAAAA and sfkafskafne mean something in a language that you speak, but if these are effectively random I strongly urge you to rename them. Using good, clear names is very important.
When i try to add my github repo Gitlink i get this error
! No default language could be detected for this app.
HINT: This occurs when Heroku cannot detect the buildpack to use for this application automatically.
See https://devcenter.heroku.com/articles/buildpacks
! Push failed
What is wrong???
Heroku knows that your app is a Python app by the existence of one of two files in the root of your application:
PipFile
requirements.txt
You should set up a requirements.txt or Pipfile in order to get your project work on Heroku. In addition, you will need Postgres as your deployment DB, if you need a db at all.
You can have a look for more at the docs or the getting started guide
I have an app on heroku named as floating-river-39482 .And I'm trying to deploy the app by giving the command git push heroku master .
But I got an error from terminal like this
remote: ! No such app as sleepy-inlet-36834.
fatal: repository 'https://git.heroku.com/sleepy-inlet-36834.git/' not found
In this error message the name of the app is sleepy-inlet-36834 .But I'm trying to push the app floating-river-39482 .
I don't have an app named sleepy-inlet-36834.
How can I correct this error?
It looks like you've somehow got your Git repository referencing an old (or deleted) Heroku application.
What you can do most easily is open up your .git/config file in your project, and switch out the https://git.heroku.com/sleepy-inlet-36834.git/ URL with the correct one for your Heroku application: https://git.heroku.com/floating-river-39482.git.
Then give it another go =)
To explain further: Heroku works by using Git to setup a 'remote'. Remotes are just places you can push (or pull) code from. Git creates remotes by listing them in your project's .git/config file.
I recently made some changes to the structure of my Flask app hosted on heroku and now heroku has decided to detect it as a Node.js app intead of a Python app. My application uses both python (Flask) for the backend api and javascript for the front end.
The changes I made included integrating npm and bower into my application to streamline the javascript development of the app.
The problem was introduced when I added a package.json to my root directory when I started using npm. It seems that the build detection script runs the nodejs detection first (here) which leads to this code: if [ -f $1/package.json ]; then
echo "Node.js" && exit 0 executing and Heroku thinks it's a nodejs app and exits before the python detection has a chance to run.
To solve this I had to manually tell Heroku that I wanted a python build using this command
heroku config:set BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-python.
The package.json file is causing Heroku to detect it as a node.js app. To prevent this, add the file name to a .slugignore file:
echo 'package.json' >> .slugignore
git add .slugignore
.slugignore is like .gitignore. It resides in the root directory of your repository and should contain a list of filenames and wildcard patterns. The matching files remain in your git repository, but are deleted from the slug after you push to Heroku. The deletion occurs before the buildpacks run, so the node.js buildpack won't find package.json and the app won't be misidentified as a node.js app.
I'm following this link for uploading my app on heroku. Earlier I was facing git push heroku master Permission denied (publickey). error, but I resolved it by adding SSH keys of my github account to heroku using heroku keys:add. Now I'm facing an error that when I push data into heroku using git push heroku master , it says
No such app as still-bastion-1881.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Now, Where is the problem lying? I'm using ubuntu.