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

ssh_authorize duplicates keys #13

Closed
eykd opened this issue Jul 21, 2011 · 6 comments
Closed

ssh_authorize duplicates keys #13

eykd opened this issue Jul 21, 2011 · 6 comments

Comments

@eykd
Copy link

eykd commented Jul 21, 2011

I would expect ssh_authorize to be idempotent, but running it repeatedly results in duplicate keys in .ssh/authorized_keys.

I attempted to rewrite it using something like file_update(keyf, lambda _: text_ensure_line(_, key)) but this produces duplicate lines as well.

@superbobry
Copy link
Contributor

Hm, this is weird -- file_update looks perfectly fine to me, except for this EOL thing.

@sebastien
Copy link
Owner

It might be time to write some test cases -- will investigate that, thanks!

@superbobry
Copy link
Contributor

Good idea! it's always the time for tests :)

@eykd
Copy link
Author

eykd commented Jul 21, 2011

Tests would be great. :) I agree it looks right, but it results in duplicate lines. :/ I'm going to see if I can fix it in my fork--I've got some other fixes that I'd like to send in a pull request eventually.

@sebastien
Copy link
Owner

That would be amazing, thanks.

@sebastien
Copy link
Owner

Fixed in 40f1fc8

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

No branches or pull requests

3 participants