質問編集履歴
1
capistrano.log エラー内容を追記
    
        title	
    CHANGED
    
    | 
         
            File without changes
         
     | 
    
        body	
    CHANGED
    
    | 
         @@ -24,7 +24,26 @@ 
     | 
|
| 
       24 
24 
     | 
    
         
             
            (See full trace by running task with --trace)
         
     | 
| 
       25 
25 
     | 
    
         
             
            The deploy has failed with an error: Exception while executing as ec2-user@XX.XXX.XX.XXX: scp: /tmp/git-ssh-XXX-production-XXX.sh: Permission denied
         
     | 
| 
       26 
26 
     | 
    
         
             
            ```
         
     | 
| 
      
 27 
     | 
    
         
            +
            $ `less log/capistrano.log` を実行した結果
         
     | 
| 
       27 
28 
     | 
    
         | 
| 
      
 29 
     | 
    
         
            +
            ```
         
     | 
| 
      
 30 
     | 
    
         
            +
              INFO ---------------------------------------------------------------------------
         
     | 
| 
      
 31 
     | 
    
         
            +
              INFO START 2019-05-23 XX:XX:XX +0900 cap production deploy
         
     | 
| 
      
 32 
     | 
    
         
            +
              INFO ---------------------------------------------------------------------------
         
     | 
| 
      
 33 
     | 
    
         
            +
             DEBUG [43d4e455] Running [ -d $HOME/.rbenv/versions/2.3.1 ] as ec2-user@XX.XXX.XX.XXX
         
     | 
| 
      
 34 
     | 
    
         
            +
             DEBUG [43d4e455] Command: [ -d $HOME/.rbenv/versions/2.3.1 ]
         
     | 
| 
      
 35 
     | 
    
         
            +
             DEBUG [79115bee] Finished in 0.230 seconds with exit status 0 (successful).
         
     | 
| 
      
 36 
     | 
    
         
            +
             DEBUG [54acff45] Running [ ! -d /var/www/XXX/shared/config ] as ec2-user@XX.XXX.XX.XXX
         
     | 
| 
      
 37 
     | 
    
         
            +
             DEBUG [54acff45] Command: [ ! -d /var/www/XXX/shared/config ]
         
     | 
| 
      
 38 
     | 
    
         
            +
             DEBUG [90dd04ed] Finished in 0.077 seconds with exit status 1 (failed).
         
     | 
| 
      
 39 
     | 
    
         
            +
             DEBUG Uploading config/secrets.yml 0.0%
         
     | 
| 
      
 40 
     | 
    
         
            +
              INFO Uploading config/secrets.yml 100.0%
         
     | 
| 
      
 41 
     | 
    
         
            +
              INFO [77da0e1a] Running /usr/bin/env mkdir -p /tmp as ec2-user@XX.XXX.XX.XXX
         
     | 
| 
      
 42 
     | 
    
         
            +
             DEBUG [77da0e1a] Command: ( export RBENV_ROOT="$HOME/.rbenv" PATH="/usr/local/rbenv/shims:/usr/local/rbenv/bin:$PATH" AWS_ACCESS_KEY_ID="XXX" AWS_SECRET_ACCESS_KEY="XXX" RBENV_VERSION="2.3.1" ; /usr/bin/env mkdir -p /tmp )
         
     | 
| 
      
 43 
     | 
    
         
            +
              INFO [35f9ae10] Finished in 0.082 seconds with exit status 0 (successful).
         
     | 
| 
      
 44 
     | 
    
         
            +
             DEBUG Uploading /tmp/git-ssh-XXX-production-XXX.sh 0.0%
         
     | 
| 
      
 45 
     | 
    
         
            +
            ```
         
     | 
| 
      
 46 
     | 
    
         
            +
             
     | 
| 
       28 
47 
     | 
    
         
             
            ## 試したこと
         
     | 
| 
       29 
48 
     | 
    
         
             
            ##### 1. dry run を実行
         
     | 
| 
       30 
49 
     | 
    
         
             
            $ `bundle exec cap production deploy --dry-run` →問題なし
         
     |