Can't modify my heroku remote - heroku

I have trouble deploying ma app to heroku.
When I do git remote -v I have:
heroku git#heroku.com:https://git.heroku.com/myapp.git (fetch)
heroku git#heroku.com:https://git.heroku.com/myapp.git (push)
instead of:
heroku https://git.heroku.com/myapp.git (fetch)
heroku https://git.heroku.com/myapp.git (push)
How do I remove the git#heroku.com: that prepends the right url ?
Thanks

Use these commands to change heroku remote.
git remote rm heroku
git remote add heroku https://git.heroku.com/myapp.git

Related

How to redeploy my laravel application to heroku when I deleted the url that heroku gave me

I have deleted that in dashboard due to some errors during deployment with
$ git push heroku master
and now I want to deploy my laravel application once again. But everytime during deployment it keeps on pushing to that old url. And not to the one that heroku gave me during when I type
$ heroku create
What seems to be my problem ?
Remove old remote
git remote rm heroku
and add again with
heroku git:remote -a your-app-name
or
git remote set-url heroku <new-url>

Heroku - git push

Can anyone please explain what's wrong with these?
mhsjaber:~/workspace/newsite (master) $ heroku keys:add
? Which SSH key would you like to upload? /home/ubuntu/.ssh/id_rsa.pub
Uploading /home/ubuntu/.ssh/id_rsa.pub SSH key... done
mhsjaber:~/workspace/newsite (master) $ heroku create
Creating app... done, ⬢ ancient-island-20017
https://ancient-island-20017.herokuapp.com/ | https://git.heroku.com/ancient-island-20017.git
mhsjaber:~/workspace/newsite (master) $ git push heroku
No refs in common and none specified; doing nothing.
Perhaps you should specify a branch such as 'master'.
Everything up-to-date
You have to add something first to push to heroku server. As your repository is already created on heroku thus, you have to add your app on it, in order to do that follow below steps.
(1) heroku login
(2) git init
(3) git add .
(4) git commit -am "comment"
(5) git push heroku master
in your case you were confusing heroku by not adding master in your git push command.

Heroku thinks I have more than one app remote, when I don't

These are my remotes:
Jordans-MacBook-Pro:appname jordan$ git remote -v
heroku https://git.heroku.com/appname.git (fetch)
heroku https://git.heroku.com/appname.git (push)
origin git#github.com:jfeldstein/appname.git (fetch)
origin git#github.com:jfeldstein/appname.git (push)
But when I use the Heroku toolbelt, I get the error that I have more than one app...
Jordans-MacBook-appname jordan$ heroku run echo 'hi'
! Multiple apps in folder and no app specified.
! Specify app with --app APP.
I don't get it.
I'm using the "accounts" plugin, if that matters, and have set a default account for this app. But still, only one app here.
Why do I have to specify?
This affects multiple apps on my machine.
the accounts plugin has this bug in it you can use this version though https://github.com/heroku/heroku-accounts

Failed to deploy application to heroku

I am newbie into heroku. I was trying to deploy a Django application to heroku by following steps.
Installed vartualenv
Installed Django gunicron via pip
Installed heroku toolbelt
Created an empty git
git add .
git commit -m "First commit"
ssh-keygen
heroku create
heroku keys:add
git push heroku master
And the a error
(venv)han#HEEL:~/Desktop/projects/ossko$ heroku keys:add
Found existing public key: /home/han/.ssh/id_rsa.pub
Uploading SSH public key /home/han/.ssh/id_rsa.pub... done
(venv)han#HEEL:~/Desktop/projects/ossko$ git push heroku master
ssh: connect to host heroku.com port 22: Connection timed out
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
I have follow every steps from heroku help site.
Please help me to fix this error
I have Ubuntu 13.4 64bit os
Update: here is the result of git remote -v:
$git remote -v
heroku git#heroku.com:infinite-mesa-xxx.git (fetch)
heroku git#heroku.com:infinite-mesa-xxx.git (push)
Try running git remote -v. Does it give you more than one remote, like this?
your_app_name git#heroku.com:your_app_name.git (fetch)
your_app_name git#heroku.com:your_app_name.git (push)
If the remote depot is named something other than 'heroku' you will need to specify the push to that site instead. For example, if your remote is named ossko, try something like
git push ossko master
Often you will have different names for remote depots if you have more than one heroku app - you can use a different name for each app.
Ok, i just solved the problem, This problem is with adding ssh key.
So the correct commands for heroku deploying is
nihan#heel:~$ heroku login
Enter your Heroku credentials.
Email: debashis.dip#gmail.com
Password (typing will be hidden):
Authentication successful.
nihan#heel:~$ cd dev/flask-app
nihan#heel:~/dev/flask-app$ heroku keys:clear
Removing all SSH keys... done
nihan#heel:~/dev/flask-app$ heroku keys:add
Found existing public key: /home/nihan/.ssh/id_rsa.pub
Uploading SSH public key /home/nihan/.ssh/id_rsa.pub... done
nihan#heel:~/dev/flask-app$ ssh-add ~/.ssh/id_rsa <---- This was the missing key
Enter passphrase for /home/nihan/.ssh/id_rsa:
Identity added: /home/nihan/.ssh/id_rsa (/home/nihan/.ssh/id_rsa)
nihan#heel:~/dev/flask-app$ git push heroku master
Because my ssh never knew which key to use it somehow have heroku the wrong information and that's why heroku was denying.

git with app in heroku and github

With an app in heroku, with git url like git#heroku.com:app.git,
And a repo in github https://github.com/username/other_app.git
Is possible sync the two repos for hosting the sema app in two git servers (heroku and github) ?
And also Link Heroku app to Github repo. For what?
Yes of course this is possible, because git is a distributed repository. You can configure multiple remotes, one at GitHub and one at heroku, and just push your changes to both of them.
Example:
Create repository at GitHub
Clone this repository on your machine, now you have setup the remote "origin" to be GitHub
Setup heroku and add the heroku git remote (either by running heroku create or heroku git:remote -a my_heroku_app). Find details in the git documentation of heroku.
here are some useful commands when working with github/heroku:
show github remote:
git remote show origin
show heroku git:
git remote show heroku
push github to heroku:
git push heroku master
if you have a 'staging' branch on github and want to push this to heroku git (master) for a
'staging app':
git push heroku staging:master -v

Resources