can't deploy git repository to dokku instance (fatal: {reponame} does not appear to be a git repository)

I’m trying to deploy my application which is located on my local git repo to my dokku instance on digitalocean.

Zone file

  • deploying to digital ocen from bitbucket - Permission denied (publickey) error
  • Dokku push resulting in broken pipe when deploying to Digital Ocean
  • Cannot push git repo to Dokku remote on Digital Ocean droplet?
  • Access node app on digital ocean - This site can't be reached
  • Ubuntu / DigitalOcean - Unable to fetch packages to install git on a fresh install
  • Rails 4 + Capistrano 3 : fatal: Could not read from remote repository while deploying
    $TTL 1800
    ... 1800 IN A 1800 IN CNAME
    * 1800 IN A 1800 IN A

    I intend to deploy my app on

    dokku setup

    I used the dokku image on digitalocean to setup the server, which currently runns on dokku v0.4.15, and tried to deploy my app according to the guide which is obviousely obsolete, however, I didn’t find a more recent one.

    ssh setup

    I also set up the SSH keys and config file, so I’m able to log in to my dokku instance over SSH for both users root and dokku:

    ssh {username} // works

    local ssh config file

            IdentityFile   ~/.ssh/mydomain
            PreferredAuthentications publickey


    When I try to deploy my git repo:

    git remote add dokku
    git push dokku master

    it would throw me

    fatal: 'test' does not appear to be a git repository
    fatal: Could not read from remote repository.
    Please make sure you have the correct access rights
    and the repository exists.

    What did I miss?

    Edit 1

    I also ssh’ed into the server and added the dokku app

    dokku apps:create test

    The app seems to have been added correctly server-side..

    dokku@mydomain:~$ dokku apps
    =====> My Apps

    .. however, the push is still failing.

  • Is it possible to clone a git repo when given "<IP Address>:/<Path to App> with Jenkins
  • Removing untracked files
  • Which branch do commits from a deleted branch belong to?
  • cannot checkout .gitattributes
  • Ignoring directories in Git repos on Windows
  • Set file as non-binary in git
  • 2 Solutions collect form web for “can't deploy git repository to dokku instance (fatal: {reponame} does not appear to be a git repository)”

    I wasn’t able to solve the problem for the oneclick dokku-installation on digitalocean, so instead, I had to setup the instance manually, which wasn’t that hard.

    Dokku setup

    1. Create a new Ubuntu 14.04.4 x64 droplet.
    2. Don’t setup the RSA yet, use password authentication to login to the droplet.
    3. Install dokku:

      sudo DOKKU_TAG=v0.5.2 bash

    Setup RSA

    Assumption: We don’t use the default RSA key (usually .ssh/, but instead a custom one: .ssh/

    1. add the public key using the following one-liner

      cat ~/.ssh/ | ssh “sudo sshcommand acl-add dokku custom-identifier”

    For more information please refer to this page

    Deploy repo

    Deploy your repo, for a quick test this example can be used.
    Also, the DNS need to be setup accordingly (if the apps name is test, then should point to your servers IP, as also shown in the OP).

    The most current instructions are on Deploying to Dokku

    Create the application on the Dokku host. You will need to ssh onto the host to run this command.

    # on your dokku host
    dokku apps:create ruby-rails-sample

    (In your case, you would create ‘test‘)

    That should be enough to create a remote git repo for you to push to.

    Git Baby is a git and github fan, let's start git clone.