Skip to content

Cannot add ssh keys to gitblit running in docker container #1415

Open
@Ivan-Shestakov

Description

@Ivan-Shestakov

Trying to add ssh keys to a user in running gitblit/gitblit:rpc version from docker.io.
Nothing happens when I click add button in users profile, ssh keys tab. Viewing network in dev-tools shows the ajax call succeeded (status code 200), but the key isn't added.
While troubleshooting, I tried to push the key via command line, but keep getting errors about problems reading ssh keys from stdin

cat id_rsa.pub | ssh -l admin -p 29418 localhost keys add
Password authentication
Password:
The data read from SDTIN can not be parsed as an SSH public key!

podman logs gitblit shows:
2022-05-01 14:38:59 [INFO ] 1 repository models loaded for admin in 1 msecs
2022-05-01 14:38:59 [INFO ] loading ssh keystore for admin
2022-05-02 07:24:34 [INFO ] 1 repository models loaded for admin in 1 msecs
2022-05-02 07:24:34 [INFO ] loading ssh keystore for admin
2022-05-02 07:27:29 [INFO ] creating ssh session from /10.184.0.1:43458
2022-05-02 07:27:31 [INFO ] onExecute: RootDispatcher exits with: 1
2022-05-02 07:27:31 [INFO ] closed ssh session from /10.184.0.1:43458

Docker image version

REPOSITORY TAG IMAGE ID CREATED SIZE
docker.io/gitblit/gitblit rpc 90cf9827d633 3 weeks ago 256 MB
Host linux version: RHEL 8.5 (hence usage of podman instead of docker)

Steps to reproduce:

  1. As a root user, run podman pull gitblit/gitblit:rpc
  2. run podman run -d --name gitblit -v gitblit-data:/var/opt/gitblit -p 8443:8443 -p 8080:8080 -p 9418:9418 -p 29418:29418 gitblit/gitblit
  3. open web ui on port 8443 and login with default admin/admin user
  4. navigate to "my profile" and switch to ssh keys tab. Attempt to paste an ssh public key value and click "add" button
    Expected - the key is added, and can be used to push content to repositories
    Actual - nothing happens

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions