Skip to content

SSH keys truncated on new install #183

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

Closed
rkeevil opened this issue Apr 30, 2014 · 0 comments
Closed

SSH keys truncated on new install #183

rkeevil opened this issue Apr 30, 2014 · 0 comments
Assignees
Labels

Comments

@rkeevil
Copy link

rkeevil commented Apr 30, 2014

Hi,

I've just setup a fresh install of Redmine/Gitolite for testing. Using a MySQL backend, the gitolite_public_keys.key column is defined as a VARCHAR(255), which leads to pub keys being truncated and failing gitolite's internal tests:

2014-04-30.10:56:15     2423    ssh     ARGV=redmine_gitolite_admin_id_rsa      SOC=git-receive-pack '/gitolite-admin.git'      FROM=127.0.0.1               
2014-04-30.10:56:15     2423    pre_git gitolite-admin  redmine_gitolite_admin_id_rsa   W       any     refs/.*                                              
2014-04-30.10:56:15     2423            system,git,shell,-c,git-receive-pack '/export/git/repositories/gitolite-admin.git'                                   
2014-04-30.10:56:15     2423    update  gitolite-admin  redmine_gitolite_admin_id_rsa   W       refs/heads/master       e5509e7fff8aa1d85b2b65beec228a3ab7e8fd9a     53130c897b54738165e3ab35443e0d9fa115d34d        refs/.*                                                                                              
2014-04-30.10:56:15     2423            system,gitolite compile                                                                                              
2014-04-30.10:56:15     2423            system,gitolite trigger POST_COMPILE                                                                                 
2014-04-30.10:56:15     2423            system,/export/git/bin/triggers/post-compile/ssh-authkeys,POST_COMPILE                                               
2014-04-30.10:56:15     2423    die     fingerprinting failed for 'keydir/redmine_keevil@redmine_1398873374_838250.pub'                                      
2014-04-30.10:56:15     2423            system() failed,/export/git/bin/triggers/post-compile/ssh-authkeys,POST_COMPILE,-> 6400                              
2014-04-30.10:56:15     2423            system() failed,gitolite trigger POST_COMPILE,-> 6400                                                                
2014-04-30.10:56:15     2423    END

(e.g. the ssh-keygen -l -f keydir/...pub command fails)

Redmine itself doesn't show that there were any problems adding the key:

2014-04-30 10:56:14 -0500 DEBUG [GitHosting]  ssh-keygen -l -f /tmp/foo20140430-32450-edb0fm 2>&1
2014-04-30 10:56:14 -0500 INFO [GitHosting] User 'keevil' has added a SSH key
2014-04-30 10:56:14 -0500 DEBUG [GitWorker] add_ssh_key : get lock !
2014-04-30 10:56:14 -0500 INFO [GitWorker] Using Gitolite configuration file : 'gitolite.conf'
2014-04-30 10:56:14 -0500 INFO [GitWorker] add_ssh_key : SSH key 'redmine_keevil@redmine_1398873374_838250' does not exist in Gitolite, create it ...
2014-04-30 10:56:14 -0500 INFO [GitWorker] add_ssh_key : commiting to Gitolite...
2014-04-30 10:56:14 -0500 INFO [GitWorker] add_ssh_key : pushing to Gitolite...
2014-04-30 10:56:15 -0500 INFO [GitWorker] add_ssh_key : done !
2014-04-30 10:56:15 -0500 DEBUG [GitWorker] add_ssh_key : lock released !

The old upgraded install (I haven't git pulled the plugin on that for a few weeks) has that column defined as a MySQL TEXT, which is 2^16 bytes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants