1
我使用兩個相同的用於測試capistrano部署過程的相同流浪盒。我可以成功地將應用程序從dev
框部署到prod
框。但是,我無法擺脫密碼確認。在流浪環境中擺脫mkdir命令的capistrano密碼確認
據我可以看到從輸出,確認發生在部署過程試圖運行mkdir -p /capistrano/tmp
如下所示。
$ bundle exec cap production deploy --trace
** Invoke production (first_time)
** Execute production
** Invoke load:defaults (first_time)
** Execute load:defaults
** Invoke deploy (first_time)
** Execute deploy
** Invoke deploy:starting (first_time)
** Execute deploy:starting
** Invoke deploy:check (first_time)
** Invoke git:check (first_time)
** Invoke git:wrapper (first_time)
** Execute git:wrapper
00:00 git:wrapper
01 mkdir -p /capistrano/tmp
[email protected]'s password:
prod
服務器上的當前權限如下(我已經如所描述的手動scp: /tmp/git-ssh.sh: Permission denied授予777):
[email protected]:~$ ls -l/
drwxrwxrwx 3 vagrant vagrant 4096 Apr 7 16:30 capistrano
[email protected]:~$ ls -l /capistrano/
drwxrwxrwx 2 vagrant vagrant 4096 Apr 7 16:33 tmp
然後,當我鍵入密碼,它下/capistrano/tmp/
路徑創建git-ssh-football-production-vagrant.sh
。
[email protected]:~$ ls -l /capistrano/tmp/
-rwx------ 1 vagrant vagrant 93 Apr 7 16:33 git-ssh-football-production-vagrant.sh
我已經刪除/創建/使用不同的文件夾有777個權限遊民用戶,並試圖www-data
很好,但無法擺脫密碼確認。
deploy.rb
...
set :tmp_dir, "/capistrano/tmp"
set :user, "vagrant"
...
production.rb