在EC2上部署Dokku,初始git推送失败
问题描述:
我想在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
无济于事
答
的问题是,我希望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