dokku: 'new-app' does not appear to be a git repository
Hi,
I have a problem similar to #1608.
I get this error when pushing to a newly created app:
fatal: 'new-app' 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.
Existing app’s do not have this problem and I can just git push to those apps as usual.
I did mess about a bit with the user credentials for the dokku user (enabled password access). I understand that this might be causing this behaviour? What I do not understand is why it only affects newly created apps, and not existing ones? 😃.
I have checked the authorized_keys for the dokku user and the fingerprint statement is present.
Any ideas? Thanks!
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 17 (9 by maintainers)
Alright so the issue was the same issue.
@Corstiaan84 copied his local key via
ssh-copy-id
, which is not the correct way to add a new user.The correct way is to do it via
sshcommand
, as linked here.If your public key is local on your machine:
If the key is on the dokku machine and you are already logged in as root, you can do the following:
A few things to note:
dokku
part is the ssh user we use to deploy. Unless you somehow customized this - and I really hope you didn’t, because we don’t officially support that - you should always leave this asdokku
.custom-identifier
should be a distinct key. If you installed dokku and used the web-installer, the first key will be added as theadmin
identifier. If you used debconf, you might have that first key set asdefault
. An upcoming release ofsshcommand
may enforce this being unique, but at the moment you can re-use identifiers.custom-identifier
is used as theSSH_NAME
in theuser-auth
plugin trigger, so having semi-unique ones per actual user is sort of useful, as then you can try to scope their commands on a per-app basis.I will add documentation for this, but yeah, essentially this was user error. Because the key wasn’t added via
sshcommand
, git push didn’t work. Removing the key and re-adding it viasshcommand
made everything work just fine.Just leaving a note for others who come across here - the public link to the troubleshooting page is http://dokku.viewdocs.io/dokku/getting-started/troubleshooting/
This issue is appearing on digitalocean one click-installer* with an odd quirk where configuring with ssh keys causes the problem above. Using
sshcommand
does not solve the problem at the moment.Currently it seems the best approach is not to add keys initially and then walk through a few additional steps: http://stackoverflow.com/questions/36242646/cant-deploy-git-repository-to-dokku-instance-fatal-reponame-does-not-appear
Someone who is in charge of the one-click installer for DO might want to take a look at this.