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

Dir.home causes ArgumentError (couldn't find login name -- expanding `~') #20

Open
BrunoNagano opened this issue Dec 17, 2019 · 0 comments

Comments

@BrunoNagano
Copy link

BrunoNagano commented Dec 17, 2019

Hi,

I have been testing this plugin and it is great. However, I encountered the following error:

ArgumentError (couldn't find login name -- expanding `~')

I am not a ruby/rails developer, but I did some debugging. The error is being caused by the line Dir.home + "/.ssh/known_hosts" on the lib/redmine_git_mirror/ssh.rb file.
The error is caused by the lack of a HOME variable being set on the httpd user installed by the Arch Linux package.
I am not sure if this would occur on other distros, but I added the following to the file in order to get the home directory directly from the etc/passwd file.

require 'etc'
Etc.getpwuid.dir + "/.ssh/known_hosts"

Adding this issue as I am not really sure if this is the best fix for the problem and it might help someone who cannot get the plugin to work.

Thanks a lot for the plugin.

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

1 participant