Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows compatibility #5

Closed
josecelano opened this issue Jan 29, 2014 · 6 comments
Closed

Windows compatibility #5

josecelano opened this issue Jan 29, 2014 · 6 comments

Comments

@josecelano
Copy link

Hi:

I am trying to use Capifony+capistrano-gitflow in Windows but when I run:

$cap staging deploy

I get this error:

$ cap staging deploy
    triggering load callbacks
  * ?[32m2014-01-29 01:21:05 executing `staging'?[0m
    triggering start callbacks for `deploy'
  * ?[32m2014-01-29 01:21:05 executing `multistage:ensure'?[0m
  * ?[32m2014-01-29 01:21:05 executing `deploy'?[0m
  * ?[32m2014-01-29 01:21:05 executing `deploy:update'?[0m
 ** transaction: start
  * ?[32m2014-01-29 01:21:05 executing `deploy:update_code'?[0m
    triggering before callbacks for `deploy:update_code'
?[32m--> Updating code base with checkout strategy?[0m
  * ?[32m2014-01-29 01:21:05 executing `gitflow:calculate_tag'?[0m
    triggering before callbacks for `gitflow:calculate_tag'
  * ?[32m2014-01-29 01:21:05 executing `gitflow:verify_up_to_date'?[0m
El sistema no puede encontrar la ruta especificada.
Password for 'https://bitbucketusername@bitbucket.org':
  * ?[32m2014-01-29 01:21:22 executing `gitflow:tag_staging'?[0m
What does this release introduce? (this will be normalized and used in the tag f
or this release) initxxx
Tagging current branch for deployment to staging as 'staging-2014-01-29-1-computer-name-slash-username-init'
fatal: too many params
Password for 'https://bitbucketusername@bitbucket.org':
Everything up-to-date
    ?[33mexecuting locally: "git ls-remote git@bitbucket.org:team/repositoryname.git staging-2014-01-29-1-computer-name-slash-username-initxxx"?[0m
    ?[2;37mcommand finished in 3063ms?[0m
    ?[33mexecuting locally: "git rev-parse --revs-only staging-2014-01-29-1-cumputer
-name-slash-username-initxxx"?[0m
    ?[2;37mcommand finished in 150ms?[0m
*** [?[34mdeploy:update_code?[0m] ?[34mrolling back?[0m
  * ?[33mexecuting multiple commands in parallel?[0m
    -> "else" :: "rm -rf /var/www/staging.domain.com/releases/201401290121
39; true"
    -> "else" :: "rm -rf /var/www/staging.domain.com/releases/201401290121
39; true"
    servers: ["domain.com", "staging.domain.com"]
Password:
    [domain.com] executing command
    [staging.domain.com] executing command
    ?[2;37mcommand finished in 629ms?[0m
c:/Ruby193/lib/ruby/gems/1.9.1/gems/capistrano-2.15.5/lib/capistrano/recipes/dep
loy/scm/git.rb:245:in `query_revision': Unable to resolve revision for 'staging-
2014-01-29-1-computer-name-slash-cusername-init' on repository 'git@bitbucket.o
rg:domain/domain.git'. (RuntimeError)
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/capistrano-2.15.5/lib/capistran
o/recipes/deploy/scm/base.rb:35:in `block in method_missing'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/capistrano-2.15.5/lib/capistran
o/recipes/deploy/scm/base.rb:63:in `local'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/capistrano-2.15.5/lib/capistran
o/recipes/deploy/scm/base.rb:35:in `method_missing'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/capistrano-2.15.5/lib/capistran
o/recipes/deploy.rb:43:in `block in load'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/capistrano-2.15.5/lib/capistran
o/configuration/variables.rb:87:in `call'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/capistrano-2.15.5/lib/capistran
o/configuration/variables.rb:87:in `block in fetch'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/capistrano-2.15.5/lib/capistran
o/configuration/variables.rb:110:in `block in protect'
        from <internal:prelude>:10:in `synchronize'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/capistrano-2.15.5/lib/capistran
o/configuration/variables.rb:110:in `protect'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/capistrano-2.15.5/lib/capistran
o/configuration/variables.rb:78:in `fetch'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/capistrano-2.15.5/lib/capistran
o/configuration/variables.rb:95:in `[]'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/capistrano-2.15.5/lib/capistran
o/recipes/deploy/strategy/base.rb:86:in `revision'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/capistrano-2.15.5/lib/capistran
o/recipes/deploy/strategy/checkout.rb:14:in `command'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/capistrano-2.15.5/lib/capistran
o/recipes/deploy/strategy/remote.rb:15:in `deploy!'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/capistrano-2.15.5/lib/capistran
o/recipes/deploy.rb:253:in `block (2 levels) in load'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/capistrano-2.15.5/lib/capistran
o/configuration/execution.rb:138:in `instance_eval'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/capistrano-2.15.5/lib/capistran
o/configuration/execution.rb:138:in `invoke_task_directly'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/capistrano-2.15.5/lib/capistran
o/configuration/callbacks.rb:25:in `invoke_task_directly_with_callbacks'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/capistrano-2.15.5/lib/capistran
o/configuration/execution.rb:89:in `execute_task'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/capistrano-2.15.5/lib/capistran
o/configuration/namespaces.rb:191:in `method_missing'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/capistrano-2.15.5/lib/capistran
o/configuration/namespaces.rb:110:in `block in define_task'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/capistrano-2.15.5/lib/capistran
o/recipes/deploy.rb:234:in `block (3 levels) in load'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/capistrano-2.15.5/lib/capistran
o/configuration/execution.rb:56:in `transaction'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/capistrano-2.15.5/lib/capistran
o/configuration/namespaces.rb:191:in `method_missing'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/capistrano-2.15.5/lib/capistran
o/recipes/deploy.rb:233:in `block (2 levels) in load'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/capistrano-2.15.5/lib/capistran
o/configuration/execution.rb:138:in `instance_eval'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/capistrano-2.15.5/lib/capistran
o/configuration/execution.rb:138:in `invoke_task_directly'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/capistrano-2.15.5/lib/capistran
o/configuration/callbacks.rb:25:in `invoke_task_directly_with_callbacks'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/capistrano-2.15.5/lib/capistran
o/configuration/execution.rb:89:in `execute_task'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/capistrano-2.15.5/lib/capistran
o/configuration/namespaces.rb:191:in `method_missing'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/capistrano-2.15.5/lib/capistran
o/configuration/namespaces.rb:110:in `block in define_task'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/capistrano-2.15.5/lib/capistran
o/recipes/deploy.rb:201:in `block (2 levels) in load'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/capistrano-2.15.5/lib/capistran
o/configuration/execution.rb:138:in `instance_eval'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/capistrano-2.15.5/lib/capistran
o/configuration/execution.rb:138:in `invoke_task_directly'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/capistrano-2.15.5/lib/capistran
o/configuration/callbacks.rb:25:in `invoke_task_directly_with_callbacks'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/capistrano-2.15.5/lib/capistran
o/configuration/execution.rb:89:in `execute_task'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/capistrano-2.15.5/lib/capistran
o/configuration/execution.rb:101:in `find_and_execute_task'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/capistrano-2.15.5/lib/capistran
o/cli/execute.rb:46:in `block in execute_requested_actions'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/capistrano-2.15.5/lib/capistran
o/cli/execute.rb:45:in `each'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/capistrano-2.15.5/lib/capistran
o/cli/execute.rb:45:in `execute_requested_actions'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/capistrano-2.15.5/lib/capistran
o/cli/help.rb:19:in `execute_requested_actions_with_help'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/capistrano-2.15.5/lib/capistran
o/cli/execute.rb:34:in `execute!'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/capistrano-2.15.5/lib/capistran
o/cli/execute.rb:14:in `execute'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/capistrano-2.15.5/bin/cap:4:in
`<top (required)>'
        from c:/Ruby193/bin/cap:23:in `load'
        from c:/Ruby193/bin/cap:23:in `<main>'
username@COMPUTER-NAME /d/git/Projects/domain/src/domain (develop)

And this is my deploy.rb file:

# deploy.rb

set   :application,   "AppName"
set   :deploy_to,     "/var/www/domain.com"
set   :domain,        "domain.com"

set   :user,          "root"
ssh_options[:forward_agent] = true
#ssh_options[:keys] = %w(//.ssh/domain_private_key_rsa)

set   :repository,    "git@bitbucket.org:domain/domain.git"
set   :scm,           :git
# Or: `accurev`, `bzr`, `cvs`, `darcs`, `subversion`, `mercurial`, `perforce`, or `none`
set   :git_enable_submodules, 1 
set   :ssh_options, { :forward_agent => true } 
set   :scm_verbose,   :true

set :model_manager, "doctrine"
# Or: `propel`

role  :web,           domain
role  :app,           domain, :primary => true

set   :use_sudo,      false
set   :keep_releases, 3

set :stages,        %w(production staging)
set :default_stage, "staging"
set :stage_dir,     "app/config"
require 'capistrano/ext/multistage'
require 'capistrano/gitflow' # needs to come after multistage

# Be more verbose by uncommenting the following line
logger.level = Logger::MAX_LEVEL

How could I get more info about the error?

El sistema no puede encontrar la ruta especificada.=System can find the specified path.

Thanks

@technicalpickles
Copy link
Owner

Looked over the stack trace, and found these lines:

    ?[2;37mcommand finished in 629ms?[0m
c:/Ruby193/lib/ruby/gems/1.9.1/gems/capistrano-2.15.5/lib/capistrano/recipes/dep
loy/scm/git.rb:245:in `query_revision': Unable to resolve revision for 'staging-
2014-01-29-1-computer-name-slash-cusername-init' on repository 'git@bitbucket.o
rg:domain/domain.git'. (RuntimeError)
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/capistrano-2.15.5/lib/capistran
o/recipes/deploy/scm/base.rb:35:in `block in method_missing'

It makes me think that the 'staging-
2014-01-29-1-computer-name-slash-cusername-init' branch isn't pushed up to the remote.

@josecelano
Copy link
Author

THank you @technicalpickles Josh.

I am using windows with Git Bash. I execute git commands and all goes fine. I am going to try with ubuntu shell first to check all configuration is ok, and then come back to windows. I think It could be something related with Windwos compatibility.

Have you tested capistrano-gitflow in Windows?

@technicalpickles
Copy link
Owner

I have not, no. If you're able to track down a cause and fix, I'd be happy to merge though.

@bogdanRada
Copy link
Collaborator

Is this still happening with current version? If yes could you post your git version? It seems to me git is failing with "fatal: too many params".

@bogdanRada
Copy link
Collaborator

I can't seem to reproduce this. I checked on windows 7 and 8 and it did worked properly. Maybe i am missing something. I would really like some more details on this if someone could provide that.

@bogdanRada
Copy link
Collaborator

This issue can be marked as stale because it has not been commented on for at least
three months.

The resources of this project team are limited, and so we are asking for your help.

If you can still reproduce this error on master, please reply with all of the information you have about it in order to keep the issue open.

Thank you for all your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants