Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Issues
  • #5517

Closed
Open
Created Nov 02, 2013 by Administrator@rootOwner

Gitlab-shell wrong ssh public key inside authorized_keys

Created by: fzerorubigd

The problem is, when I add a key via web interface, the key added in authorized_keys has some modification, so the ssh do not accept them.

The modification is simple, it "escape" things like " " (space) and "+" (plus) and "=" for example :

command="/home/gitlab/gitlab-shell/bin/gitlab-shell key-8",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty ssh-rsa\ AAAAB3NzaC1yc2EAAAADAQABAAABAQCs/hEA8E/ ....... Pds81/\+kAx2 ......

see the \ after ssh-rsa or right before + , If I remove them manually, every thing is ok. but by adding new key all my changes are gone :)

 bundle exec rake gitlab:env:info RAILS_ENV=production

System information
System:         Debian 7.1
Current User:   gitlab
Using RVM:      no
Ruby Version:   1.9.3p194
Gem Version:    1.8.23
Bundler Version:1.3.5
Rake Version:   10.1.0

GitLab information
Version:        6.2.2
Revision:       31736e9
Directory:      /home/gitlab/gitlab
DB Adapter:     mysql2
URL:            http://---
HTTP Clone URL: http://---/some-project.git
SSH Clone URL:  gitlab@---:some-project.git
Using LDAP:     no
Using Omniauth: no

GitLab Shell
Version:        1.7.3
Repositories:   /home/gitlab/repositories/
Hooks:          /home/gitlab/gitlab-shell/hooks/
Git:            /usr/bin/git
 bundle exec rake gitlab:check RAILS_ENV=production                                                                                                       
Checking Environment ...

Git configured for gitlab user? ... yes
Has python2? ... yes
python2 is supported version? ... yes

Checking Environment ... Finished

Checking GitLab Shell ...

GitLab Shell version >= 1.7.3 ? ... OK (1.7.3)
Repo base directory exists? ... yes
Repo base directory is a symlink? ... no
Repo base owned by gitlab:gitlab? ... yes
Repo base access is drwxrws---? ... yes
update hook up-to-date? ... yes
update hooks in repos are links: ... 
master / dotssh ... ok
Running /home/gitlab/gitlab-shell/bin/check
Check GitLab API access: OK
Check directories and files: 
        /home/gitlab/repositories: OK
        /home/gitlab/.ssh/authorized_keys: OK
gitlab-shell self-check successful

Checking GitLab Shell ... Finished

Checking Sidekiq ...

Running? ... yes
Number of Sidekiq processes ... 1

Checking Sidekiq ... Finished

Checking GitLab ...

Database config exists? ... yes
Database is SQLite ... no
All migrations up? ... yes
GitLab config exists? ... yes
GitLab config outdated? ... no
Log directory writable? ... yes
Tmp directory writable? ... yes
Init script exists? ... yes
Init script up-to-date? ... no
  Try fixing it:
  Redownload the init script
  For more information see:
  doc/install/installation.md in section "Install Init Script"
  Please fix the error above and rerun the checks.
projects have namespace: ... 
master / dotssh ... yes
Projects have satellites? ... 
master / dotssh ... yes
Redis version >= 2.0.0? ... yes
Your git bin path is "/usr/bin/git"
Git version >= 1.7.10 ? ... yes (1.7.10)

Checking GitLab ... Finished

ps - warning about the Init script is false alarm, the only thing is I install gitlab, with gitlab user(the git user is a working gitolite installation and I do not want to mix thing there) so I update the /etc/init.d/gitlab to use gitlab user, if I revert my changes there is no warning but I can't use that script. And yes, I change every single one of config files and I think every thing is ok, just the above problem. I think its another report by the way :)

Assignee
Assign to
Time tracking