I am having a problem trying to login to heroku via Cloud 9 IDE. I recieve this error when trying to login.
jafar70:~/workspace (master) $ heroku login
Enter your Heroku credentials.
Email: jafsalami#hotmail.co.uk
Password (typing will be hidden):
▸ HTTP Error: https://api.heroku.com/login 410 Gone
▸ Invalid response from API.
▸ HTTP 410
▸ {email password}
▸
▸ Are you behind a proxy?
▸ https://devcenter.heroku.com/articles/using-the-cli#using-an-http-proxy
You need to update the Heroku CLI. For that, do:
wget -qO- https://cli-assets.heroku.com/install-ubuntu.sh | sh
Related
I've got a problem when I upload my project on Heroku. I've trying changing value of socket.io and MongoUrl, but I get this error:
Error: Missing required flag:
› -a, --app APP app to run command against
This has nothing to do with any of your files. It's an argument that you must provide to the Heroku CLI itself, e.g.
heroku config:set SOME_VARIABLE=some_value -a myapp
where myapp is the name of your Heroku app.
The -a / --app argument is required when heroku can't figure out what app to connect to, either bcause there is no Heroku remote configured or because there is more than one Heroku remote configured.
See also How to avoid the --app option with heroku CLI?
I've seen a couple of SO posts, and despite googleing and the heroku --help, I keep getting the same error
I've been working off of this:
https://devcenter.heroku.com/articles/heroku-postgres-import-export
$ heroku pg:backups:restore 'secure-file-location-url' DATABASE_URL --app heroku-app-name --confirm heroku-app-name
Starting restore of secure-file-location-url to postgresql-flat-47715... done
Use Ctrl-C at any time to stop monitoring progress; the backup will continue restoring.
Use heroku pg:backups to check progress.
Stop a running restore with heroku pg:backups:cancel.
Restoring... !
▸ An error occurred and the backup did not finish.
▸
▸ waiting for restore to complete
▸ pg_restore finished with errors
▸ waiting for download to complete
▸ download finished with errors
▸ please check the source URL and ensure it is publicly accessible
▸
▸ Run heroku pg:backups:info r018 for more details.
$ heroku pg:backups:info r018
› Error: Missing required flag:
› -a, --app APP app to run command against
› See more help with --help
My secure-file-location-url is a public Google Drive link, which I can access in an incognito browser window.
As discussed in the comments, your database dump is being hosted on Google Drive and the link you're providing goes to a viewer with a "download file" button.
Instead, you must provide a direct link to the file. The documentation recommends using Amazon S3.
I ran into this problem as well, how I solved it was by adding run to the Heroku CLI command. Formatted like so:
heroku pg:backups:restore '<signed url>' DATABASE_URL -a <your-application-name>
Literally, put DATABASE_URL in there and it will read it from your environment variables. If you try putting in the postgress address it will fail. Also, the application needs to be the last thing added to this command, order matters here.
I execute:
> heroku login
and introducing my Heroku username and password, I get:
Logged in as l*********.com
I can execute successfully:
> heroku auth:token
cccc8aa0-aaaa-aaaa-aaaa-bbbb03b38932
after that, I execute:
> git push heroku master
but I get:
remote: ! WARNING:
remote: ! Do not authenticate with username and password using git.
remote: ! Run `heroku login` to update your credentials, then retry the git command.
remote: ! See documentation for details: https://devcenter.heroku.com/articles/git#http-git-authentication
fatal: Authentication failed for 'https://git.heroku.com/myapp.git/'
What am I doing wrong? It says that I should "not authenticate with username and password using git".. but in that case, what should I do? The docs say:
You cannot authenticate with the Heroku HTTP Git endpoint using your Heroku username (email) and password. Use an API key as described in this section
But it's hard to understand what I should actually do.
I was able to fix it using SSH protocol:
Generate a key: ssh-keygen -t rsa
Upload it to Heroku heroku keys:add
Switching to SSH: git config --global url.ssh://git#heroku.com/.insteadOf https://git.heroku.com/
When I run heroku deploy:jar app.jar --app app, I receive this error:
$ heroku deploy:jar build/libs/app.jar --app app
Uploading app.jar
-----> Packaging application...
- app: app
- including: build/libs/app.jar
! ERROR: Could not get API key! Please install the toolbelt and login with `heroku login` or set the HEROKU_API_KEY environment variable.
! Re-run with HEROKU_DEBUG=1 for more info.
▸ There was a problem deploying to app.
▸ Make sure you have permission to deploy by running: heroku apps:info -a app
Here's there environment's information:
On a Mac.
Heroku version: heroku-cli/6.16.12 (darwin-x64) node-v9.11.1
Heroku plugins: heroku-cli-deploy 0.4.0
java version "1.8.0_131"
node version: v4.9.1
I've tried running heroku login multiple times. After it's run, I can run heroku apps:info -a app and it lists the information. I'm inferring that that means I'm logged in already.
My login works on another computer, so I assume it's a local config issue and not an account issue. When I set HEROKU_DEBUG=1, it provides no additional information.
The issue lay in heroku login. It creates a file ~/.netrc containing your login and token.
The format of this generated file on another mac (the mac I mentioned the deploy was working fine) was as follows:
machine api.heroku.com
password ...
login ...
machine git.heroku.com
password ...
login ...
The format of the same generated file on the mac which was giving the above problem was as follows:
machine api.heroku.com login ... password ...
machine git.heroku.com login ... password ...
Apparently, both formats are fine for most Heroku commands such as viewing apps and such. But for the deploy command (which requires the heroku-cli-deploy plugin, only the first format is acceptable.
So basically the heroku cli accepts both new lines and spaces as delimiters between the endpoint, login, and token. But the deploy plugin only accepts new lines. heroku login was using spaces for some reason; so heroku commands were working, while the heroku deploy commands were not.
There would be another reason for the same error in Ubuntu. For some reason in Ubuntu it is easy to make jhipster cli installation that requires sudo while heroku cli don't allow to log in under sudo because browser start doesn't work from the sudo call. And it is uneasy to figure out, what was wrong with jhipster sudo installation, which particular files now owned by the root and so on.
But if you have logged to heroku cli not from the root user (i.e not using sudo) or created api key variable not from root user (i.e not using sudo) your deploy will fail with the error above if you'll request jhipster with sudo:
sudo hipster heroku
if you'll try it without sudo, it will hang on
Installing Heroku CLI deployment plugin
To make it working just run
sudo -E jhipster heroku
and -E will pass your api key variable to the sudo execution
I'm trying to check a git remote on heroku:
$ heroku auth:logout
Local credentials cleared.
$ heroku auth:login
Enter your Heroku credentials.
Email: ***#gmail.com
Password (typing will be hidden):
Authentication successful.
$ git remote
heroku
origin
$ git remote show heroku
Username for 'https://git.heroku.com':
Password for 'https://git.heroku.com':
remote: ! WARNING:
remote: ! Do not authenticate with username and password using git.
remote: ! Run `heroku login` to update your credentials, then retry the git command.
fatal: Authentication failed for 'https://git.heroku.com/***-1909.git/'
This error is referenced in the heroku docs, in the screenshot above at https://devcenter.heroku.com/articles/git , but I'm not sure what to do next to fix this.
This is what worked for me.
$ heroku auth:token
Use the result as the password when prompted.
As the warning says, you just need to do:
heroku login
And it will open your browser for logging in, enter details as per your authentication and you will be good to roll in.
I solve this issue no implicit conversion from nil to integer (TypeError) by it by pushing the updates to heroku and when they asked for the user name I added my email and the password it's in this link https://dashboard.heroku.com/account in API KEYS
Username for 'https://git.heroku.com': your email
Password for 'https://email#git.heroku.com': API KEYS
Run this
heroku login
git add .
git commit -m "..."
git push heroku main
This is going to work
After logged with: heroku login
Some access for example on cloning an existing project in your account, is not
allowed using git native even stay you logged in, and only using git from heroku, such as:
heroku git:[command]
an example clonning a repository:
heroku git:clone -a [app_name]
Otherwise, sometimes, after logged with heroku login, you can check your remote git with: git remote -v
Other way, is you use heroku auth:token and use their output as password, of course, run it after logged.