【问题标题】:Deploying Dokku on EC2, initial git push failing在 EC2 上部署 Dokku,初始 git push 失败
【发布时间】:2017-09-06 02:24:33
【问题描述】:

我正在尝试在 EC2 (ubuntu) 上部署 Dokku 0.10.4,但没有成功(我使用的是 Mac)。我按照手册中的所有安装步骤进行操作,但没有任何乐趣

基本上,当我git push myclient_ec2 master 时,我得到一个 Permission Denied

我的设置如下:

ssh/配置

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

.git/config

[remote "myclient_ec2"]
    url = dokku@example.com:myapp
    fetch = +refs/heads/*:refs/remotes/dokku/*

安装顺序如下

ssh -i ~/.ssh/AWS_ID.pem ubuntu@example.com wget https://raw.githubusercontent.com/dokku/dokku/v0.10.4/bootstrap.sh
ssh -i ~/.ssh/AWS_ID.pem ubuntu@example.com sudo DOKKU_TAG=v0.10.4 bash bootstrap.sh
ssh -i ~/.ssh/AWS_ID.pem ubuntu@example.com rm bootstrap.sh*

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

也试过换成

.git/config

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

git push myclient_ec2 master

无济于事

【问题讨论】:

    标签: git dokku


    【解决方案1】:

    问题是我希望 dokku 安装使用我的 Amazon 帐户中的公钥来设置 git 存储库。那是不可能的或不起作用的。无论如何,为 dokku git 设置我的公共 ~/.ssh/id_rsa.pub 密钥解决了这个问题。下面的命令就是这样做的

    ssh - i ~/.ssh/AWS.pem ubuntu@ec_ip
    echo ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGsp3HJnOqJ9BuHkQ5Myt2z3LEKQC_etc_id_rsa.pub | sudo dokku ssh-keys:add admin
    

    【讨论】:

      猜你喜欢
      • 2014-01-09
      • 1970-01-01
      • 1970-01-01
      • 2015-07-31
      • 1970-01-01
      • 2023-01-31
      • 1970-01-01
      • 1970-01-01
      • 2016-12-03
      相关资源
      最近更新 更多