Skip to content

Can't restore authorized_keys containing ascii

Summary

This issue has been open on this GitHub issue for over a year and I just had to guide a customer through using the fix on this ZenDesk issue

Steps to reproduce

Both the ZenDesk ticket and the GitHub issue that I linked explain the problem well.

Expected behavior

If there was no errors during the backup, there should be no errors during the restore.

Actual behavior

Error that blocks restore form happening.

Relevant logs and/or screenshots

Here is the error: /home/git/gitlab-shell/lib/gitlab_keys.rb:59:in split': invalid byte sequence in US-ASCII (ArgumentError)`

Output of checks

Results of GitLab application Check

(For installations with omnibus-gitlab package run and paste the output of: sudo gitlab-rake gitlab:check SANITIZE=true)

I don't want to bother the ZenDesk user with this since their immediate problem is already solved, please let me know if you need this and I will reproduce it locally and get you the output.

(we will only investigate if the tests are passing)

Results of GitLab environment info

(For installations with omnibus-gitlab package run and paste the output of: sudo gitlab-rake gitlab:env:info)

Possible fixes

The workaround suggested in the GitHub issue worked for our customer, but I doubt it is a good long term solution.