Sto provando a fare 'deploy: cold' per la mia app. Il repository git è locale a il mio server di distribuzione (ad esempio, ho solo un server per tutto e io non host il mio codice su github).Capistrano + Git: repository locale al server di produzione
Ecco la trascrizione (sostituito il mio nome app con "myapp" per la privacy)
* executing `deploy:cold'
* executing `deploy:update'
** transaction: start
* executing `deploy:update_code'
executing locally: "git ls-remote /home/mrichman/git/myapp.git master"
fatal: '/home/mrichman/git/myapp.git' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
*** [deploy:update_code] rolling back
* executing "rm -rf /var/www/myapp.com/releases/20100218203108; true"
servers: ["myapp.com"]
Password:
[myapp.com] executing command
command finished
Command git ls-remote /home/mrichman/git/myapp.git master returned status code 32768
Ecco il mio deploy.rb: http://pastie.org/831424
Ho anche provato
set :repository, "[email protected]:/home/mrichman/git/myapp.git"
ma questo mi dà
ssh: connect to host localhost port 22: Connection refused
Tutte le idee sono apprezzate.
Ora ho il seguente, che non riesce anche: set: repository, "file: ///var/git/myapp.git" set: local_repository, "localhost: /var/git/myapp.git" eseguendo localmente: "git ls-remote localhost: /var/git/hireexchange.git master" ssh: connettersi alla porta host localhost 22: Connessione rifiutata –
Stai sviluppando sulla stessa casella? Se lo immaginereste: local_repository, "file: //var/git/myapp.git" funzionerebbe. localhost deve essere sostituito con qualsiasi sia il nome host a cui ci si connette dalla workstation remota presunta. Inoltre, ho scoperto che se disponi di sottomoduli ti imbatterai in più problemi eseguendo una distribuzione come questa, perché i moduli sono impostati per puntare a un URL remoto. Molto fastidioso, ma può essere risolto utilizzando .ssh/config sul server sotto l'utente che si distribuisce come. – pmarsh
Ciao ragazzi. Se fa alcuna differenza, git sulla mia macchina locale e remota richiedeva percorsi diversi, quindi avevo bisogno di impostare: git_local/path/to/remote/git e set: git/usr/bin/git (nota che questi non richiedono l'ssh in l'inizio). – btelles