2017-09-06 71 views
0

我想在EC2(ubuntu)上部署Dokku 0.10.4,但我沒有成功(我使用Mac)。我跟着手冊,但沒有喜悅在EC2上部署Dokku,初始git推送失敗

基本上在所有安裝步驟,我得到一個權限被拒絕時,我git push myclient_ec2 master

我的設置如下:

SSH /配置

Host myclient_ssh 
    Hostname example.com 
    User ubuntu 
    IdentityFile ~/.ssh/AWS_ID.pem 

.git/config

[remote "myclient_ec2"] 
    url = [email protected]:myapp 
    fetch = +refs/heads/*:refs/remotes/dokku/* 

安裝seq uence如下

ssh -i ~/.ssh/AWS_ID.pem [email protected] wget https://raw.githubusercontent.com/dokku/dokku/v0.10.4/bootstrap.sh 
ssh -i ~/.ssh/AWS_ID.pem [email protected] sudo DOKKU_TAG=v0.10.4 bash bootstrap.sh 
ssh -i ~/.ssh/AWS_ID.pem [email protected] rm bootstrap.sh* 

ssh -i ~/.ssh/AWS_ID.pem [email protected] apps:create myapp 
git remote add myclient_ec2 [email protected]:myapp 
cat ~/.ssh/AWS_ID.pem | ssh myclient_ssh "sudo sshcommand acl-add dokku [description]" 

也試過了變化,以

的.git /配置

[remote "myclient_ec2"] 
    url = [email protected]_ssh:myapp 
    fetch = +refs/heads/*:refs/remotes/dokku/* 

git push myclient_ec2 master

無濟於事

回答

0

的問題是,我希望dokku安裝使用我的亞馬遜賬戶中的公共密鑰設置th e git存儲庫。這是不可能的或沒有工作。無論如何,爲dokku git設置公共〜/ .ssh/id_rsa.pub鍵解決了這個問題。下面的命令是這樣的

ssh - i ~/.ssh/AWS.pem [email protected]_ip 
echo ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGsp3HJnOqJ9BuHkQ5Myt2z3LEKQC_etc_id_rsa.pub | sudo dokku ssh-keys:add admin