cap deploy permission denied error

21 views
Skip to first unread message

judy ngai

unread,
Feb 4, 2014, 10:11:40 AM2/4/14
to railsmachin...@googlegroups.com
When I am doing cap deploy I am getting a permission denied error,

The public key from both my mac and linux are up on github/server. 
The server public key already exist in git. I think the server is having trouble git cloning the repo from git but the access should be good to go. cap deploy:setup works very well. I inherited this app so there are files already created and users already created. can someone give me a clue? 

I am going through the tutorial here
https://github.com/railsmachine/moonshine/wiki/Tutorial

Judys-MacBook-Air:q-sort judyngai$ cap deploy 
    triggering start callbacks for `deploy'
  * executing `moonshine:configure'
  * executing `deploy'
    triggering before callbacks for `deploy'
  * executing `deploy:update'
 ** transaction: start
  * executing `deploy:update_code'
    executing locally: "git ls-remote g...@git.repo.com:q-sort.git master"
    command finished in 1743ms
  * executing "git clone -q  g...@git.repo.com:q-sort.git /srv/q-sort/releases/20140204150143 && cd /srv/q-sort/releases/20140204150143 && git checkout -q -b deploy 6442113480fb819a7627fd8b120b4e183d1d58db && git submodule -q init && git submodule -q sync && git submodule -q update --init --recursive && (echo 6442113480fb819a7627fd8b120b4e183d1d58db > /srv/q-sort/releases/20140204150143/REVISION)"
    servers: ["ucr-1"]
    [ucr-1] executing command
 ** [ucr-1 :: out] E, [2014-02-04T14:55:24.023041 #5450] ERROR -- : permission denied
 ** [ucr-1 :: out] fatal: The remote end hung up unexpectedly
    command finished in 1262ms
*** [deploy:update_code] rolling back
  * executing "rm -rf /srv/q-sort/releases/20140204150143; true"
    servers: ["ucr-1"]
    [ucr-1] executing command
    command finished in 228ms
failed: "sh -c 'git clone -q  g...@git.repo.com:q-sort.git /srv/q-sort/releases/20140204150143 && cd /srv/q-sort/releases/20140204150143 && git checkout -q -b deploy 6442113480fb819a7627fd8b120b4e183d1d58db && git submodule -q init && git submodule -q sync && git submodule -q update --init --recursive && (echo 6442113480fb819a7627fd8b120b4e183d1d58db > /srv/q-sort/releases/20140204150143/REVISION)'" on ucr-1

Kevin Lawver

unread,
Feb 4, 2014, 10:19:28 AM2/4/14
to railsmachin...@googlegroups.com
Hi Judy,

Is git.repo.com the correct server?  I'd check the :repository: line in config/moonshine.yml and make sure that's correct.  It's definitely a git issue between the server you're deploying to and the git repo - either the public key isn't allowed by the git server, or the server address is incorrect.

Kevin

judy ngai

unread,
Feb 4, 2014, 10:32:36 AM2/4/14
to railsmachin...@googlegroups.com
Hi Kevin,

the line is actually this,

# Reposistory URI for checking out code at deploy time
:repository: g...@git.assembla.com:q-sort.git

I figured it may be sensitive and changed it to just repo.
maybe I can try regenerating another public key in my server and add it to git.

Thank You,
Judy

Kevin Lawver

unread,
Feb 4, 2014, 2:13:22 PM2/4/14
to railsmachin...@googlegroups.com
I'd ssh to your server as the deploy user and see what happens when you run: ssh g...@git.assembla.com

If that's the problem, it should give you a proper error message.

--
You received this message because you are subscribed to the Google Groups "Moonshine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to railsmachine-moon...@googlegroups.com.
To post to this group, send email to railsmachin...@googlegroups.com.
Visit this group at http://groups.google.com/group/railsmachine-moonshine.
For more options, visit https://groups.google.com/groups/opt_out.

Jarin Udom

unread,
Apr 30, 2014, 4:46:00 PM4/30/14
to railsmachin...@googlegroups.com
Hi Judy,

Based on the app name and the server name, I think you actually inherited this project from me haha

Please feel free to email me at ja...@robotmodehq.com and I can answer any questions you've got.

Best regards,
Jarin Udom
Reply all
Reply to author
Forward
0 new messages