Getting Started with Heroku and OS X - can't login - macos

After I signed up and install Heroku toolbelt, I tried to login as instructions ( https://devcenter.heroku.com/articles/quickstart ) say. I typed $ heroku login and I should get email and password prompt, but instead I get only one word in response: login. I don't know how to proceed and I tried to find solution - but I have no luck. Thank you for the answers.

OK, I did not misunderstand you ;-)
The binary heroku is either not installed, or not in your $PATH. When you type
$heroku login
with the leading $, the shell interprets $heroku as a variable, which is not set and it takes the next command login. This command lets you log in as another user on your machine…
So you have to find out what went wrong with the installation of Heroku, since you get heroku: command not found, as you wrote on my deleted answer.
If Heroku is installed correctly, you should be able to log in with this command (according to docs) in your Terminal.app:
heroku login

After hours of searching I finally find something. I used instructions from this article: http://samuelsharaf.wordpress.com/tag/heroku-install
To be more specific, I only used these commands:
curl -L https://get.rvm.io | bash
gem install heroku
Now it works fine. Thank you anyway for your time :)

Related

Can't log in to Heroku through CLI, after successfully logging in it won't let me enter any other commands

I'm using Windows 10 and Git Bash for my CLI. I have tried logging in through the default browser pop up as well as using $ heroku login -i to force a login using the CLI. Both have the same result, it says I have successfully logged in but the cursor just sits flashing under where it says I'm logged in and any command entered is ignored, it just advances to the next line.
CLI Window showing stuck cursor
I have made sure I am on the latest version of Git Bash (v2.34.1) and the heroku cli is also up to date (v7.59.2). I have also uninstalled and reinstalled Git Bash.
I did see a similar post where the same thing was happening to someone and they said they could login through the windows terminal and they were going to try uninstalling/reinstalling git bash but they never followed up with whether that worked or not (it didn't for me). I also was able to successfully login using the windows terminal but I'm just curious if there is a known fix for this issue so I can keep using git bash.

Heroku CLI only works from root

I'm not sure why, but I can only run the Heroku CLI from root, not from a user.
When I run from user I get
>>heroku -v
and that's it. Nothing comes, nothing happens, it just freezes.
However when I open a new terminal window and change to root, it works fine
>>sudo su
Password:
>>heroku -v
heroku-cli/6.15.26 (darwin-x64) node-v9.6.1
>>
I have already tried uninstalling and reinstalling over and over again, I've used the Heroku direct download, as well as Homebrew, but I can't get it to work. I'm not really sure what I did to break my CLI, but how do I fix it? Where should I even look to see what the actual problem is?
UPDATES:
I've also changed shell types, and that did nothing to fix the issue either. The shell lists Terminal -- node /usr/local/bin/heroku -v at the top, if that helps.
As per the comments below, we tried copying the directory that the root user uses into my .local/share but this did not solve the problem either.
Further, I opened my activity monitor, and any time I try to run Heroku, it shows that node is taking up 95-100% of my CPU.
Spent nearly 12 days chatting with heroku staff. It turns out if your .netrc file is long (mine was 1.9 million lines), their parser has issues reading it.
Solution:
$ rm ~/.netrc
$ heroku login
Once the file is removed and you re-login it will create a new .netrc file without issues.
Why this happens:
My crontab uses an expect script to login to the blank environment. If you login over, and over and over, the .netrc file becomes huge.

Heroku CLI Error: create is not a heroku command

I have created heroku applications from the terminal before, but for some reason, this is not working for me:
$ heroku create my-app
I get the following result
Refreshing plugins... !
▸ semver has no commands. Is this a CLI plugin?
Refreshing plugins... done
Refreshing plugins... !
▸ semver has no commands. Is this a CLI plugin?
Refreshing plugins... done
▸ create is not a heroku command.
▸ Perhaps you meant update
▸ Run heroku help for a list of available commands.
I updated my brew to have the latest version of heroku. When I run heroku -v I get:
heroku-cli/6.15.11 (darwin-x64) node-v9.3.0
I'm also pretty sure it is installed correctly. When I run which heroku I get:
/usr/local/bin/heroku
One weird clue seems to be that heroku help gives me the following:
Refreshing plugins... !
▸ semver has no commands. Is this a CLI plugin?
Refreshing plugins... done
Refreshing plugins... !
▸ semver has no commands. Is this a CLI plugin?
Refreshing plugins... done
Usage: heroku COMMAND
Help topics, type heroku help TOPIC for more details:
auth
plugins add/remove CLI plugins
Which seems like it clearly does not include create as one of the commands, so do I need to add create somehow? I know that create is shorthand for apps:create so I tried both and got the same result.
I'm not sure if it's relevant, but I recently updated to Mac OS High Sierra.
I hit the same problem. The only solution I found was to uninstall from homebrew, and then manually install the heroku-cli package from here https://cli-assets.heroku.com/heroku-cli/channels/stable/heroku-cli.pkg
I only experienced this after upgrading to High Sierra.
Please, make sure your path variable are setup correctly
Please, make sure that you are logged in to your account.
You can login using following command from command line:
$ heroku login
Email: <your email>
Password: <your password>
navigate to the root folder in your system where you want to host application locally and try with your command.
This ended up being a bigger issue than originally expected. Today (after trying the suggestion in the comments), I realized I was also having issues with node (I was unable to npm init anywhere). I ended up completely reinstalling macOS.
When that didn't work, I erased and reinstalled macOS completely. After reinstalling node and heroku through brew, it did work.
I know erasing and reinstalling macOS is a pretty drastic option, but it didn't seem like anything else was working. I'm hoping there's a better answer out there, but I just wanted to include this in case someone else stumbled upon this question.

Windows bash 'Cannot create property 'exitCode' on string 'autoupdate:' Installing Heroku CLI/Toolbelt

I am attempting to install the Heroku CLI/Toolbelt on an bash shell version 4.3.48(1) (x86_64-pc-linux-gnu) running on Windows 10. I'm entering wget -qO- https://cli-assets.heroku.com/install-ubuntu.sh | sh in the command line, and after the packages download I'm getting the below:
Preparing to unpack .../heroku_6.14.24-1_amd64.deb ...
Unpacking heroku (6.14.24-1) ...
Setting up heroku (6.14.24-1) ...
+ which heroku
+ LOCATION=/usr/bin/heroku
+ echo heroku cli installed to /usr/bin/heroku
heroku cli installed to /usr/bin/heroku
+ heroku version
▸ Cannot create property 'exitCode' on string 'autoupdate:'
And then it just takes me back to the command line. If I try heroku --v or any other heroku CLI command I get this same error
▸ Cannot create property 'exitCode' on string 'autoupdate:'
I can't find any record of this error code anywhere online. Any thoughts? I really do not know where to start here, usually a good search at least sets me on the path but I have crickets here. Let me know if any further details are required. FWIW the toolbelt was working as of a few days ago, I just had to uninstall and reinstall my bash shell due to an unfortunate incident with Linuxbrew so am rebuilding everything from scratch.
this is fixed but the CLI might have trouble updating. Delete ~/.local/share/heroku and run heroku update and it should be fixed.

Cannot login to heroku

When I try to login to my heruko account it says:
Post
https://api.heroku.com/login?username=xxxxxxx%40gmail.com&password=XXXXXXXX:
dial tcp: lookup api.heroku.com on 127.0.1.1:53: cannot unmarshal DNS
message
I'm using Linux Mint 17.2
I resolved this problem by un-installing the current Heroku Toolbelt and re-installing it.
First Uninstalled-
sudo apt-get --purge remove heroku-toolbelt
Then, installed-
wget -qO- https://toolbelt.heroku.com/install-ubuntu.sh | sh
I had similar issue and could solve it by the above process.
Hope this will help as an answer to most of the question/s related to this error.
I was facing the same issue, but after some digging , i resolved it by modifying my DNS
DNS to 8.8.8.8.
It worked like a charm thenafter.
I solved my problem using this:
sudo su
heroku login
I don't know why but I removed non-aplhanumeric characters from my password (ie I changed my password to not include them), and it worked.
Just to clarify: a password like passw0r8$#% works on the website but not the command line, but passw0r8 does work on the command line.
I tried everything above and nothing worked. What got it working for me was adding this line to my /etc/hosts:
23.21.149.112 api.heroku.com
I came cross this issue also,finally I solved it by heroku update and use a proxy.I guess this is kind of net-trouble.
I just encountered this problem,it took me half a day to solve it .As a beginner,I worked in Ubuntu 15 ,using Python 2.7. (Google was blocked because of GFW.)
Just Three steps.
1.Modify The password only composed of letters and numbers,contain no "?","_","*","&"etc.
2.I have tried DNS "8.8.8.8""8.8.4.4""114.114.114.114",but failed.
I modified DNS for "223.5.5.5" "223.6.6.6"(alidns) terminally.
( ~$ sudo vi /etc/resolv.conf
Then modify 'nameserver xx.xx.xx.xx' and save.)
Use ~$ heroku auth:login

Resources