For the past day or so, the Ubuntu repository for Heroku Toolbelt has been reporting the following:
Failed to fetch http://toolbelt.heroku.com/ubuntu/./Packages 302 Moved Temporarily [IP: 23.21.198.2 80]
What gives?
I assume some configuration on the Heroku servers is broken. If I edit the file /etc/apt/sources.list.d/heroku.list
and replace the existing line
deb http://toolbelt.heroku.com/ubuntu ./
with
deb https://s3.amazonaws.com/heroku-toolbelt/ apt/
I can run apt-get update
but I still can't download any packages.
I assume this is a temporary issue, but I've reported it to the Heroku support just to be sure.
EDIT: According to the Heroku support this is caused by a redirect from HTTP to HTTPS. Changing the line in /etc/apt/sources.list.d/heroku.list
to use https should fix the issue. I can't verify it atm, though. See also the related pull request
I believe you are experiencing the same problem posted in this question. I was able to work around the problem and installing the heroku toolbelt today on an Ubuntu 13-based system by installing the standalone toolkit rather than the Ubuntu/Debian bundle. The standalone won't automatically install Git and Foreman, but will get you running with the toolkit. You'll also need to have Ruby installed before executing the script below. I used apt to install a recent version.
I encountered some errors on my Ubuntu-based distro because on Ubuntu systems /bin/sh is dash, not bash, which you can avoid by modifying heroku's script after grabbing it to explicitly call bash:
Get heroku's install script
wget -q https://toolbelt.heroku.com/install.sh
Edit line 10 to use bash instead of sh and save:
sudo bash <<SCRIPT
Execute the script (using sh or bash, it doesn't matter)
sh install.sh
Pay attention to the script's exit message and add the heroku CLI to your PATH (assuming it's not already there)
$ echo 'PATH="/usr/local/heroku/bin:$PATH"' >> ~/.profile
You'll have to logout/login to the load the PATH change and execute heroku without using the full path.
来源:https://stackoverflow.com/questions/19194283/heroku-toolbelt-ppa-update-check-failing