Closed rikusilvola closed 7 years ago
I see I've mistakenly created this PR to release branch. Would you like me to cancel this and make another for the master branch?
Yes. Make a new PR based on the master branch.
And a better fix would be to set umask
before file creation.
@dolmen, that is the case already if the filed doesn't exist. This bug only occurs when the config file exists, and has incorrect permissions, thus requiring changing them.
Do you mean that github-keygen should fix a bug introduced by someone else (may be the user himself)? I disagree.
Or maybe the user really wants other permissions than 0600
(for example to share the config with multiple users of the same group) and github-keygen
would break that. I do not see any valid reason to be stricter about permissions on ~/.ssh/config
than ssh
itself (which allows mode 0660
for example).
This patch automates setting the correct file permissions of the ssh client configuration file, which might otherwise be too permissive, should it already exist.