Fingerprint cannot be generated, fingerprint = nil
Hi,
I have installed Gitlab on a VM. My environment settings:
System information System: Ubuntu 16.04 Current User: git Using RVM: no Ruby Version: 2.1.2p95 Gem Version: 2.2.2 Bundler Version:1.11.2 Rake Version: 10.3.1 Sidekiq Version:2.17.0
GitLab information Version: 6.9.2 Revision: e46b644a Directory: /home/git/gitlab DB Adapter: postgresql URL: http://GIT01 HTTP Clone URL: http://GIT01/some-project.git SSH Clone URL: git@GIT01:some-project.git Using LDAP: yes Using Omniauth: no
GitLab Shell Version: 1.9.4 Repositories: /home/git/repositories/ Hooks: /home/git/gitlab-shell/hooks/ Git: /usr/bin/git
When trying to deploy an SSH key, I get the error 'Fingerprint cannot be generated'.
In production.log:
Processing by Projects::DeployKeysController#create as HTML Parameters: {"utf8"=>"✓", "authenticity_token"=>"9kMadzUgez8MJxdbsDalvrby+ia7wByYtYQKFyrXBAQ=", "deploy_key"=>{"title"=>"ss", "key"=>"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDNIDUrdw4jXRRLaXqLEt4MIDDp+mSU8ywFwEd/d7NjQZMdvBB107B62eEdBDQYfTg9Lx6leT2ksV1Zf3iUug9nH2HFgHZHD+TuKnb0beUAOLXGqUWU3vbr9x4AVu9b6KuARx/3OGcQvMsK0Sx7U6KhIvwb1dISHz92WfqG+dLyryu7usF+mWueWC9JgZisdN14vVkVaGOqC4werKt8zgGgtW+AsAFiQg5nZeAmErGprK3QMfFkiTLASU4Y7oHRiqy1xdJSvd5DqHpzY3Xo2dnYH5Q//sFkmC01ZIaV5nFPxpHGn6ZTlLf/1pAf+vyG3hBZuXPN4m+tefnm/sXLWrUf christos.xxxxxxxx@yahoo.com"}, "project_id"=>"chris/christest"} Completed 200 OK in 236ms (Views: 70.5ms | ActiveRecord: 10.5ms)
Doing this from Ruby console:
irb(main):001:0> k = Key.new(key: File.read('/tmp/id_rsa.pub')) => #<Key id: nil, user_id: nil, created_at: nil, updated_at: nil, key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDNIDUrdw4jXRR...", title: nil, type: nil, fingerprint: nil> irb(main):002:0> k.send(:generate_fingerpint) => "2048 SHA256:mQmR065tF5em0jhSYdU4YVvv+8wFmkPaL9gSFC+l2CI christos.xxxxxxxx@yahoo.com (RSA)\n"
Fingerprint is generated successfully, but when I display it gives me nil, which is very strange
irb(main):003:0> k.fingerprint => nil
So I guess this is the reason I cannot add an SSH key.
Please advise,
Thanks