0

Few months ago I used to deploy my project from my ubuntu PC with the "cap deploy" command without problem. However, I have tried few minutes ago to deploy the same project from my mac but the svn command failed (see below)

executing locally: "svn info https://xxxx.jp/svn/xxx_iphone/trunk --username \"xxxx\"--password \"xxx\"--no-auth-cache  -rHEAD"

As you can see, [username],[password] and [no-auth-cache] are sticked (without space) .

Under ubuntu, I got this command (that is executed normally)

executing locally: "svn info https://xxxx.jp/svn/xxx_iphone/trunk --username xxxx --password xxx --no-auth-cache  -rHEAD"

Ruby version : 2.0.0p0 Rails version : 4.0.0

Any ideas ? thank you

==EDIT

Log info :

$ bundle exe cap production deploy

 triggering load callbacks
  * 2013-08-26 10:06:14 10:06:14 == Currently executing `production'

production Do you really deploy? (yes/no) 
yes
    triggering start callbacks for `deploy'
  * 2013-08-26 10:06:16 10:06:16 == Currently executing `multistage:ensure'
  * 2013-08-26 10:06:16 10:06:16 == Currently executing `deploy'
  * 2013-08-26 10:06:16 10:06:16 == Currently executing `deploy:update'
 ** transaction: start
  * 2013-08-26 10:06:16 10:06:16 == Currently executing `deploy:update_code'
    executing locally: "svn info https://xxxxxxx/svn/myproject/trunk --username \"xxxxx\"--password \"zzzzz\"--no-auth-cache  -rHEAD"
Authentication realm: <https://xxxxx> Authorization
Password for 'xxxxx--password': 
Authentication realm: <https://xxxxxx> Authorization
Username: xxxx
Password for 'xxxx': 
zzzzzz--no-auth-cache:  (Not a versioned resource)

svn: A problem occurred; see other errors for details
*** [deploy:update_code] rolling back
  * executing "rm -rf /u/apps/myproject/releases/20130826010624; true"
    servers: ["iphone.xxxxx.jp"]
Password: 
    [iphone.xxx.jp] executing command
    command finished in 709ms
Command svn info https://xxxxx/svn/myproject/trunk --username "xxxx"--password "zzzz"--no-auth-cache  -rHEAD returned status code pid 448 exit 1

My Capfile

load 'deploy'
load 'deploy/assets'
load 'config/deploy'

Deploy.rb

require "capistrano/ext/multistage"
require "capistrano_colors"
require "bundler/capistrano"

require "rvm/capistrano"                       # Load RVM"s capistrano plugin.

set :application, "mygirl"
set :copy_exclude, %w(.git .gitignore doc features log spec test tmp Capfile)
#set :shared_children, shared_children + %w(public/uploads)

set :use_sudo, false
set :user, "app"

set :stages, %w(staging production)

namespace :deploy do
  task :start, roles: :app, except: { no_release: true } do
    run "cd #{current_path} && bundle exec unicorn_rails -c config/unicorn.rb -E #{rails_env} -D"
  end

  task :stop, roles: :app, except: { no_release: true } do
    run "kill -KILL -s QUIT `cat #{shared_path}/pids/unicorn.pid`"
  end

  task :restart, roles: :app, except: { no_release: true } do
    stop
    start
  end
end

namespace :customs do
  namespace :rake do
    desc "Run a task on a remote server."
    # run like: cap staging customs:rake:invoke task='db:version'
    task :invoke, :roles => :db do
      run("cd #{current_path}; BUNDLE_GEMFILE=#{current_path}/Gemfile bundle exec rake #{ENV['task']} RAILS_ENV=#{rails_env}")
    end
  end
end

def confirm
  puts "\n\e[0;36m#{stage}\e[0m\e[0;31m Do you really deploy? (yes/no) \e[0m\n"
  proceed = STDIN.gets rescue nil
  exit unless proceed.chomp! == "yes"
end
2
  • can you run bundle exe cap production deploy -vv so we get the 'very verbose' output.
    – TomDunning
    Commented Aug 26, 2013 at 12:15
  • I got exactly the same message with the verbose mode.
    – johann
    Commented Aug 26, 2013 at 23:55

2 Answers 2

1
+50

When I face the case, check under flow.

  1. check the "repository's permission". ex. "chmod ??? [repository]"
  2. check the "repository's owner".
  3. check the "repository's permission". It's "/etc/svnusers".
  4. check the server's status; apache, windows server. It's memory, cpu and etc.
  5. if we couldn't consult the probrem after 4. finally reboot the webserver

if u cannot resolve the 4's state, please post detail.

1
  • I cannot explain why but after rebooting apache, deploying command worked like a charm ! Thank you for resolving it .. even if I don't get origin of my error.
    – johann
    Commented Aug 29, 2013 at 3:47
1

"Not a versioned resource" makes it sound to me like you have a file in the destination folder that is not under version control and Subversion is complaining about it.

I'd try one (or all) of the following:

  • running 'svn status' on your mac and the server to check for unversioned files
  • running 'svn cleanup' on your mac (and possibly the server)
  • try running through the steps in your capfile using the capistrano console, and doing some exploration (e.g. execute 'svn status') just before you run the 'svn checkout' step
  • double-checking to see if the destination folder cap is trying to create (/u/apps/myproject/releases/20130826010624) exists, and blowing away if it does.

If none of that helps, please post your Capfile.

1
  • Thank you for your reply. I am almost sure that destination folder is not the issue. "Not a versioned resource" is for the zzzzzz--no-auth-cache ("zzzzz" is my password).I have checked but there is no unversioned files. I have updated my question with the CapFile.Thank you
    – johann
    Commented Aug 29, 2013 at 1:22

Not the answer you're looking for? Browse other questions tagged or ask your own question.