Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'new-app' does not appear to be a git repository #1813

Closed
Corstiaan84 opened this issue Jan 2, 2016 · 14 comments

Comments

@Corstiaan84
Copy link

commented Jan 2, 2016

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!

@josegonzalez

This comment has been minimized.

Copy link
Member

commented Jan 2, 2016

On the server, can you do the following:

dokku trace on

And then do a push via:

git push -v dokku master

And gist the output?

@Corstiaan84

This comment has been minimized.

Copy link
Author

commented Jan 2, 2016

I ran

dokku trace on

on the server

Then I ran

git push -v dokku master

from my local repo

Output is the same? Am I missing something?

@josegonzalez

This comment has been minimized.

Copy link
Member

commented Jan 3, 2016

There wasn't any extra output?

@Corstiaan84

This comment has been minimized.

Copy link
Author

commented Jan 3, 2016

No :-)

@josegonzalez

This comment has been minimized.

Copy link
Member

commented Jan 3, 2016

If you hop on irc, I might be able to help you there (I am @savant).

@josegonzalez

This comment has been minimized.

Copy link
Member

commented Jan 3, 2016

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:

# assuming you have ssh access via root
cat ~/.ssh/id_rsa.pub | ssh root@dokku.com "sudo sshcommand acl-add dokku custom-identifier"

If the key is on the dokku machine and you are already logged in as root, you can do the following:

# assuming you are logged in as a user with root
cat path/to/id_rsa.pub | sudo sshcommand acl-add dokku custom-identifier

A few things to note:

  • The 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 as dokku.
  • The custom-identifier should be a distinct key. If you installed dokku and used the web-installer, the first key will be added as the admin identifier. If you used debconf, you might have that first key set as default. An upcoming release of sshcommand may enforce this being unique, but at the moment you can re-use identifiers.
  • The custom-identifier is used as the SSH_NAME in the user-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 via sshcommand made everything work just fine.

@Corstiaan84

This comment has been minimized.

Copy link
Author

commented Jan 3, 2016

Thanks @josegonzalez!

@Andersama

This comment has been minimized.

Copy link

commented Jan 27, 2017

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.

@josegonzalez

This comment has been minimized.

Copy link
Member

commented Jan 27, 2017

That's digitalocean who handles that.

What image did you bring up, and what was the "quirk" you saw?

@josegonzalez josegonzalez reopened this Jan 27, 2017

@Andersama

This comment has been minimized.

Copy link

commented Jan 27, 2017

I just solved my own problem, git was configured to send a different ssh key than the one I'd been trying to use.

User error on my part*, but it seems like a lot of similar problems have happened to maybe that should be included on the readme.md

@josegonzalez

This comment has been minimized.

Copy link
Member

commented Jan 27, 2017

@Andersama do you mind adding that to our troubleshooting docs? Our docs site is fairly comprehensive, and thats where this belongs.

@josegonzalez

This comment has been minimized.

Copy link
Member

commented Jan 30, 2017

Actually, this is already in our troubleshooting docs under the following:

Symptom: I want to deploy my app but I am getting asked for the password of the git user and the error message

Nothing we can do if users decide not to read our docs. Closing.

@abarbanell

This comment has been minimized.

Copy link

commented Oct 19, 2017

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/

@josegonzalez

This comment has been minimized.

Copy link
Member

commented Oct 19, 2017

Updated my link.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.