problem on the photo.
when i use the git push heroku master terminal allways give me this response.
i search on google but i didn't find any qestion on my language.
i follow all codes but i see this.
heroku login
$ cd my-project/
$ git init
$ heroku git:remote -a afbchatapp
and
$ git add .
$ git commit -am "make it better"
$ git push heroku master
enter code here
What language are you using?
Let's start with the problem at the beginning. Usually, Heroku tries to automatically detect the type of app you deploy by looking for certain files that act as signatures for the language you're using. So for example if it's a NodeJS app and you're deploying from Github, Heroku will look for the package.json file in the main branch. You can find the rest of the information for other files here. You may want to look at this first.
From there this solution to an almost similar problem should be able to fix the push.
Related
I want to push a project I created to Heroku from Git. I'm running windows and have the Git Bash shell installed as well as the Heroku CLI. Running this from Git Bash shows my Git version:
$ git --version
git version 2.14.1.windows.1
However, when I try from that same Git Bash shell to create my application on Heroku as a remote Git repo, I get an error:
$ heroku create
bash: heroku: command not found
So instead I created my application on Heroku from a regular windows cmd terminal and that worked (i.e., when I log into heroku I see the remote repo). But when I try to do a git push from the windows cmd terminal it does not recognize git:
C:\myapp>git push heroku master
'git' is not recognized as an internal or external command,
operable program or batch file.
Whereas when I try to do a git push from the git bash shell, I get this error indicating perhaps it doesn't know what to make of heroku:
$ git push heroku master
fatal: 'heroku' does not appear to be a git repository
fatal: Could not read from remote repository.
So it seems my regular windows cmd terminal recognizes heroku, but my Git bash terminal does not. How do I configure Git bash to recognize the Heroku command?
Note: When I do a env | grep path from the Git bash shell the results do include my C:/Program Files/Heroku/bin directory, so Git is aware of my Heroku path.
Your problem is not that git would not push to heroku, but that you actually haven't installed git on your system, as the message you posted suggests.
'git' is not recognized as an internal or external command,
operable program or batch file.
At heroku's documentation there is a whole article about pushing to git, if you experience further problems after installing git, you might find a solution there.
Found a solution! It required the following 3 steps/considerations:
First, I followed john g's answer here, which is to close Git Bash and login to Heroku via a windows cmd terminal, then use Git Bash as per normal.
Second, when issuing a heroku command from Git Bash on Windows, include the extension, as described here. I.e., issue heroku.cmd create (instead of just heroku create).
Third, apparently the git push heroku master command must be issued from the same Git Bash terminal where you just issued heroku.cmd create. When I had issued it from a separate terminal I got an error saying "'heroku' does not appear to be a git repository".
I'm posting this, in hopes that it may help others and save them the same trouble I had. This was driving me mad and I tried every solution I could manage to find on the issue. Spent several hours trying to trouble-shoot it. What it actually ended up being was a conflict with my internet security, specifically Comodo Internet Security Premium 10. I received no warning, it just automatically added it to a blocked list on first execution. If you are running internet security software, especially on a Windows machine, this very well could be your issue. Remove the command file found at C:\Users\YOUR_USER_NAME\AppData\Local\heroku\client\bin\heroku.cmd from any block list, as well as any other executables from heroku that may be on the list.
I have been using heroku. I'm working alone on a small project. Every time I deploy I have to type:
git add .
git commit -m "the same random thing"
git push heroku master
Is there a way to automate this so I can type deploy?
I'm using python for the app so if the tool were in python that would be nice.
My client app that is deployed on Heroku allows the user to upload images onto Heroku. I wanted to test out a change I made to delete images, so I need a way to see the state of the folder structure on Heroku to ensure the images are being deleted successfully of the file system.
I tried -
$ heroku run bash --app <appName>
~$ pwd
~$ cd <path to images folder>
but I only see images here that I uploaded along with the app, not what was uploaded through the client app.
What am I doing wrong?
I can do with this commands
heroku login
heroku run bash -a APPNAME
$ cd app
APPNAME is the name of your Heroku application And in the folder app are your files.
When you finish your commands and want to return to your terminal you can write
$ exit
Terminal access is now provided by clicking a link "More" on the top right of the Heroku dashboard where you can select "run console".
This presents an option to run terminal commands and shows a default of 'bash'. However, you do have to explicitly enter 'bash' or other command.
If you edit files, you will have to manage synchronization back to your development code using Git.
As in #Juliano Araújo's answer but from a project folder connected via git you can just run
heroku run bash
You can do this with,
heroku run bash -a APPNAME
If the above command fails,
heroku run sh -a APPNAME
`
app settings option gives our files url
`
Then use git clone
git clone https://git.heroku.com/your_app_name.git
So none of the above worked for me on windows and couldn't access my files so I decided to just clone the git repo.
git clone <git-url>
This question already has answers here:
Is there a way to set a default app for Heroku Toolbelt?
(3 answers)
Closed 1 year ago.
Heroku toolbelt is always forcing me to write an app name at the end like this:
heroku pg:reset DATABASE --app [app_name]
Is there a way to set the default app to which all my CLI heroku commands will apply?
Going to post this just in case it helps someone else out. I had the same problem even though there was only one app installed. I had to switch my heroku remote url from https to git.
https://git.heroku.com/[heroku-app-1234].git
to
git#heroku.com:[heroku-app-1234].git
Then everything worked normally for myself.
git remote remove heroku
git remote add heroku git#heroku.com:[heroku-app-1234].git
If heroku is claiming that there are multiple apps in the folder you must have more than one remote in your .git/config.
Remove the extra heroku remote or set the default using git config heroku.remote remote_name
If you have the heroku-accounts plugin installed, switching to the heroku branch worked for me, as discussed in this answer.
To swap out your existing version of the heroku-accounts plugin, use:
heroku plugins:install https://github.com/heroku/heroku-accounts.git
Note that if you've followed #Moemars answer, you'll need to switch your git remote back to https.
If you run heroku from the Git repo linked to your Heroku app, you don't have to specify an app name (unless the repo is connected to multiple apps).
This seems to be the easiest way to fix the issue:
heroku git:remote -a <app_name>
Since this wasn't mentioned until now:
Apart from the git remote, the Heroku CLI also looks into the HEROKU_APP environment variable.
By using direnv, dotenv or similar tools for project-specific environments you can easily set the respective Heroku app for each project or directory.
I am a complete new bie to heroku
I just installed heroku toolbar and performed the below operation
$ heroku create
Creating pure-oasis-4419... done, stack is cedar
http://pure-oasis-4419.herokuapp.com/ | git#heroku.com:pure-oasis-4419.git
$ heroku create --stack cedar
Creating mighty-stream-7975... done, stack is cedar
http://mighty-stream-7975.herokuapp.com/ | git#heroku.com:mighty-stream-7975.git
$ git push heroku master
fatal: I don't handle protocol 'git#heroku.com:https'
Can any one please tell me why i am getting this error.
I also tried
git remote -v
Still I get
fatal: I don't handle protocol 'git#heroku.com:https'
I am sure i have a mistake somewhere. Could any one help me with this.
git pull the source code to your device.
start working on the code. Or just rewrite them with yours.
git add .
git commit -m "commit message"
git push
It's maybe because of your Git version. Try using the latest one as advised in older question git error: cannot handle https