요리사를 사용하여 레일/노드 앱을 배포하고 있습니다. 공용 github 저장소에서 배포 할 때 모든 것이 잘 배치됩니다. 내가 개인 github 저장소에서 배포하고 싶습니다, 그리고 그렇게하는 데 문제가 있습니다. 저는 여기에 현재 부트 스트랩 프로세스가 개인 저장소에서 배포하려고 할 때까지 잘 간다요리사에서 개인 레포 배포 : 배포 키를 잘못 사용하면 어떻게됩니까?
cd ~/.ssh # change directory to my .ssh directory
ssh-keygen -f'deploy_key' -N '' # create a deploy_key key pair without a passphrase
cat deploy_key.pub | pbcopy # copy the public key into my clipboard
-go to https://github.com/HairyMezican/PrivateRepoName/admin/keys
-click on 'Add another deploy key'
-type 'deploy_key' into 'Title' field
- ⌘V (paste command) into 'Key' field
-click 'Add Key'
tr "\n" "#" < deploy_key | sed 's/#/\\n/g' | pbcopy #copy the private key into my clipboard, except with all of the newlines replaced with a slash-n
cd ~/chef-repo #change over the the chef repo directory
mate data_bags/apps/my_app.json #edit the appropriate data bag in TextMate
--set the following couple of lines before saving
-"repository": "https://[email protected]/HairyMezican/PrivateRepoName.git",
-"deploy_key": "⌘V (paste command into here)",
knife data bag from file apps data_bags/apps/my_app.json #upload the databag to my chef server
ssh [email protected] "mkdir ~/.ssh" #create a ssh directory on my remote server
scp ~/.ssh/id_dsa [email protected]:.ssh/ #copy my private key over to the ssh directory on the remote server
cat ~/.ssh/id_dsa.pub | ssh [email protected] 'cat - >> ~/.ssh/authorized_keys' #add my public key into the authorized keys list on the remote server
knife bootstrap 12.34.56.789 -dubuntu10.04-gems -rrole[myapp] #tell my chef server to bootstrap the remote server
모든 일을하고있는 무슨이다.
12.34.56.789 [Sat, 03 Dec 2011 01:51:51 +0000] ERROR: deploy_revision[myapp] (application::rails line 155) has had an error
12.34.56.789 [Sat, 03 Dec 2011 01:51:51 +0000] ERROR: deploy_revision[myapp] (/var/chef/cache/cookbooks/application/recipes/rails.rb:155:in `from_file') had an error:
12.34.56.789 deploy_revision[myapp] (application::rails line 155) had an error: command timed out:
그런 다음 빈 나열 십분 후에 때까지,
12.34.56.789 [Sat, 03 Dec 2011 01:41:42 +0000] INFO: Processing deploy_revision[myapp] action deploy (application::rails line 155)
12.34.56.789 Password:
을하고 실질적으로 (나는 아직도 입력 할 수 있습니다, 기술적,하지만 난 입력 아무것도 스크립트 영향을 미치지 않습니다) 얼음장 : 그것은이 표시 stdout 및 stderr의 출력 및 명령을 실행하려고하는 스택 추적
무엇이 잘못 되었습니까? 개인 저장소에서 어떻게 배포 할 수 있습니까?
. 의역을 말하지 않고 키를 재생성 한 다음 사용해 볼 수 있습니까? ** 참고 : ssh 키의 의역을 사용하지 않는 것이 보안 위험이 있습니다 ** –