When forking a heroku app, I get the message "Cisaurus copy service no longer available. Use Heroku Platform API instead." No gem by that title is installed. What is causing this? Full output below, using [myapp] in place of the sourceapp name, and [targetapp] in place of the forked copy name:
[myapp]$ heroku fork -a [myapp] [targetapp]
Creating fork [targetapp]... done
Copying slug... Failed to fork app [myapp] to [targetapp].
! WARNING: Potentially Destructive Action
! This command will destroy edmeasured-sandbox (including all add-ons).
! To proceed, type "[targetapp]" or re-run this command with --confirm
[targetapp]
> [targetapp]
Deleting [targetapp]... done
Original exception below:
! Cisaurus copy service no longer available. Use Heroku Platform API instead. See: https://devcenter.heroku.com/articles/platform-api-copying-slugs
[targetapp]$
The issue is being caused by using an old version of Heroku Toolbelt. Updating via https://toolbelt.heroku.com allows the command to run as intended.
Related
I am experiencing an issue with pre-commit hooks in overcommit, which is configured to run rubocop and rails_best_practices.
In short, all three commands listed below passed but overcommit wouldn't let me commit to git. Any advice on why/how to circumvent this issue would be appreciated.
# These passed
rubocop -a
rails_best_practices .
overcommit --run
# Git commit failed
$ overcommit --run
Running pre-commit hooks
Analyze with RailsBestPractices..................[RailsBestPractices] OK
Analyze with RuboCop........................................[RuboCop] OK
✓ All pre-commit hooks passed
$ git commit -m 'Ensure lower case with Attr API'
Running pre-commit hooks
Analyze with RailsBestPractices..................[RailsBestPractices] FAILED
Errors on modified lines:
/Users/USER_NAME/projects/APP_NAME/app/models/lower_case_string.rb:2 - remove unused methods (LowerCaseString#cast)
Analyze with RuboCop........................................[RuboCop] FAILED
Errors on modified lines:
/Users/USER_NAME/projects/APP_NAME/app/models/lower_case_string.rb:3:3: C: Layout/IndentationWidth: Use 2 (not 0) spaces for indentation.
✗ One or more pre-commit hooks failed
Now, I read here that overcommit --run doesn't trigger the hooks in the same ways that it does when you actually try to commit (whole project vs only changes to be committed). However, I'm not sure how this would affect my case, especially since rubocop and rails_best_practices both passed individually as well. By the way, the errors raised here are both false alarms. rails_best_practices shouldn't be checking for unused methods in the first place, since that check has been turned off in config/rails_best_practices.yml.
After a few weeks of working with these gems, I think I've figured it out. I'll leave some pointers here for anyone who encounters similar issues.
1. Stage your changes before doing overcommit --run with git add
<file>
As this comment and docs say, the --run command does not check untracked files.
2. Add gemfile option to .overcommit.yml
One issue I had was that overcommit was failing to read my config/rails_best_practices.yml (it wasn't supposed to be checking for unused methods in the first place, since that check was turned off in the config file).
It seems that when I was trying to git commit, overcommit was using gems installed in my system (not in the Gemfile), and as a result somehow failing to read my config file. So I added the gemfile option as recommended in the docs, and made sure overcommit uses the Gemfile/bundler version. I haven't gotten the subject error ever since. As the docs say:
If you are using Bundler to manage your Ruby gem dependencies, you'll likely want to use the gemfile option to control which gem versions are available during your hook runs.
My .overcommit.yml file for reference:
gemfile: Gemfile
PreCommit:
RuboCop:
enabled: true
on_warn: fail
RailsBestPractices:
enabled: true
on_warn: fail
command: ['bundle', 'exec', 'rails_best_practices', '-c', 'config/rails_best_practices.yml']
As a side note - I haven't tried this, but apparently you can also create a separate Gemfile just for overcommit purposes, if you feel that loading your original Gemfile slows down the hook execution (docs).
Every time I enter
heroic update
I get this following message
This is the legacy Heroku CLI. Please install the new CLI from https://cli.heroku.com
heroku-cli: Updating CLI... already on latest version: 6.12.0-a504409
heroku-cli: Updating plugins... done
! `heroku update` is only available from Heroku Toolbelt.
! Download and install from https://toolbelt.heroku.com
but I did click on the link and reinstalled it, and when I try again, the same message pops up. How should I fix this?
Try adding HEROKU_DEBUG=1 to the command , it will tell any trouble it have have.
You can also try with DEBUG=* to see more verbose output of command.
Error logs files are stored at
MacOS ~/Library/Caches/heroku/error.log
Windows %LOCALAPPDATA%\heroku\error.log
Linux/Other ~/.cache/heroku/error.log (or XDG_CACHE_HOME if set)
reference https://devcenter.heroku.com/articles/heroku-cli#troubleshooting
I'm encountering a message like this while deploying with Mina, but not sure why Git is not able to pull the repo.
I've tried switching sshd_config due to Unable to negotiate a key exchange method message, but still can't figure things out. Thanks for helping.
-----> Creating a temporary build path
$ touch "deploy.lock"
$ mkdir -p "$build_path"
$ cd "$build_path"
-----> Cloning the Git repository
$ git clone "git#github.com:repo/project.git" "/home/deploy/project/scm" --bare
Cloning into bare repository '/home/deploy/project/scm'...
Unable to negotiate a key exchange method
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
! ERROR: Deploy failed.
-----> Cleaning up build
$ rm -rf "$build_path"
Unlinking current
$ rm -f "deploy.lock"
OK
! Command failed.
Failed with status 1 (19)
The issue is, that your local SSH client and the remote endpoint at GitHub are unable to agree on a common key exchange method.
This will mostly occur when you poked around with the set of available Key exchange methods or you are using a very old & outdated SSH client which does not support any method which is still regarded as safe.
Interestingly this only occurs on some GitHub Repos: I'm still able to pull from other reports.
To diagnose you can set the following environment variable to see more of the SSH output:
export GIT_SSH_COMMAND="ssh -vv"
To fix it, I added a custom entry in my config_ssh or ~/.ssh/.config allowing more legacy algorithms for that host. Please note this should appear above any Host * section:
# Github needs diffie-hellman-group-exchange-sha1 some of the
# time but not always.
Host github.com
KexAlgorithms curve25519-sha256#libssh.org,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1
At work I've been tasked with setting up out GIT server with a front end and I found GitlabHQ which looks amazing.
I've installed it all semi-successfully but I cannot push my repos at all as it says I need to push them.
Since I've never used GitLabHQ before first is:
You should push repository to proceed.
After push you will be able to browse code, commits etc.
Normal when adding projects?
and every-time I run
git push -u origin master
I get this,
W access for focus DENIED to rails
(Or there may be no repository at the given path. Did you spell it correctly?)
fatal: The remote end hung up unexpectedly
is anyone able to help since I can't expect the team to keep SSH'ing?
Thanks.
EDIT:
Server = Ubuntu Server 11.10 fully updated and I followed these instructions: https://github.com/gitlabhq/gitlabhq/wiki/V2.0-easy-setup-for-ubuntu
This was fixed by re-running the install (It must have failed silently the first time) and killing the process once it had started with
lsof -p :3000
kill 9 {Whatever the PID was returned from above}
Then re-running the bundle (differs between production or not) I use this
bundle exec rails s -e production -d
In a windows environment I am getting the following error when trying to deploy to Heroku
C:/Ruby/lib/ruby/gems/1.8/gems/heroku-1.9.13/lib/heroku/commands/base.rb:32:in ': No such file or directory - git
remote (Errno::ENOENT)
from C:/Ruby/lib/ruby/gems/1.8/gems/heroku-1.9.13/lib/heroku/commands/ba
se.rb:32:in shell'
from C:/Ruby/lib/ruby/1.8/fileutils.rb:121:in
chdir'
from C:/Ruby/lib/ruby/1.8/fileutils.rb:121:in
cd'
from C:/Ruby/lib/ruby/gems/1.8/gems/heroku-1.9.13/lib/heroku/commands/ba
se.rb:32:inshell'
from C:/Ruby/lib/ruby/gems/1.8/gems/heroku-1.9.13/lib/heroku/commands/ap
p.rb:52:in create'
from C:/Ruby/lib/ruby/gems/1.8/gems/heroku-1.9.13/lib/heroku/command.rb:
48:insend'
from C:/Ruby/lib/ruby/gems/1.8/gems/heroku-1.9.13/lib/heroku/command.rb:
48:in run_internal'
from C:/Ruby/lib/ruby/gems/1.8/gems/heroku-1.9.13/lib/heroku/command.rb:
20:inrun'
from C:/Ruby/lib/ruby/gems/1.8/gems/heroku-1.9.13/bin/heroku:13
from C:/Ruby/bin/heroku:19:in `load'
from C:/Ruby/bin/heroku:19
Any idea how I can correct this? This is being run from the Ruby Command line (which seems to me like the regular command line)
Ok so I figured out a way to make it work and why it is likely happening.
For some reason I can only run the Ruby commands from the CMD prompt however the GIT commands only seem to work from the GIT Bash. When in the GIT Bash the Ruby commands don't work.
When you run the Heroku commands to create the service it seems to want to run certain GIT commands which don't work from the CMD prompt the way I have it set up.
To get around this for the moment I am adding the Heroku path for GIT as a remote manually and then pushing that manually when needed. An extra step but everything still works as intended.
If you need help with the work around check out the information in this link: http://www.wiki.devchix.com/index.php?title=Working_around_the_%22heroku_create%22_error
I'd still recommend using Git Bash over the normal windows CMD prompt.. but I know how tedious that can be sometimes.
You can bypass the need to do this however and get your Heroku gem working properly in your windows CMD prompt by adding your msysgit/bin path to your system Path variable.
That'll give your heroku gem access to the git command.
To add heroku as remote use the following:
git remote add heroku git#heroku.com:yourappname.git
Then push your master copy to Heroku:
git push heroku master