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

sudo: no tty present and no askpass program specified #7

Closed
azhang opened this issue Jul 2, 2013 · 7 comments · Fixed by #9
Closed

sudo: no tty present and no askpass program specified #7

azhang opened this issue Jul 2, 2013 · 7 comments · Fixed by #9

Comments

@azhang
Copy link

azhang commented Jul 2, 2013

I get
sudo: no tty present and no askpass program specified
when I try to
cat ~/.ssh/id_rsa.pub | ssh [user]@[domainname] "sudo gitreceive upload-key myname"

@progrium
Copy link
Owner

progrium commented Jul 2, 2013

I think that's because you aren't provide a user to ssh, so it would normally prompt you for one, but because it's not an interactive terminal, it can't. So you have to provide your programs with enough information or with the right options so they don't need to ask for input like that.

@azhang
Copy link
Author

azhang commented Jul 2, 2013

sorry, it was hidden because I accidentally used < and >. The issue is that it wants to ask for sudo password, but can't. I just wanted to point this out because this command is in the main readme.

@progrium
Copy link
Owner

progrium commented Jul 2, 2013

Oh I see! Yes, that's problematic.

@ghost
Copy link

ghost commented Jul 2, 2013

Hmm; I can't think of a good way to fix this - I don't encounter this as I'm using passwordless sudo. Perhaps we could document around it or encourage use of a user with access to ~git/.ssh/authorized_keys?

@progrium
Copy link
Owner

progrium commented Jul 2, 2013

Maybe the init command can ensure authorized_keys gives global write permissions?

@ghost
Copy link

ghost commented Jul 2, 2013

In the context of dokku any user on the system is able to manipulate containers using docker so I can't see a downside right now to adding global write to ~git/.ssh/authorized_keys.

We would also have to update documentation across the repositories by removing the sudo or ssh root@ recommendation for the upload-key sub-command.

@azhang
Copy link
Author

azhang commented Jul 15, 2013

ah, thanks for the quick responses everyone!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants