Uploaded image for project: 'Red Hat OpenShift Dev Spaces (formerly CodeReady Workspaces) '
  1. Red Hat OpenShift Dev Spaces (formerly CodeReady Workspaces)
  2. CRW-279

SSH key doesn’t work being uploaded to GitLab

XMLWordPrintable

    • Hide

      (Proving that GitLab is set up correctly. This first scenario will use a CRW-generated key and will have no problems.)

      • Set up a GitLab project, mark it as non-public
      • Open a new CRW workspace (of arbitrary type, I use Vert.x) and attempt to import the project. It should fail, because GitLab is protecting it.
      • Go to CRW's Profile/Preferences/SSH/VCS section. Generate a new key.
      • Copy the key, insert it in GitLab (Settings/SSH Keys)
      • Try again to import the project, it should work. The SSH keys have allowed access.

      (Now to see the failure)

      • Remove the prior keys from GitLab and CRW, so they won't mask the problem
      • From the command line, generate a key for use. GitLab offers preferences for this at [1].
      • Set up a new workspace. Instead of generating a key, use the 'upload' function to upload the private key generated in the last step.
      • Go to GitLab, add the public key generated two steps ago.
      • Try to import the project in CRW. It will fail. This is the problem.

      //Gitlab offers preferences for key generation
      [1] https://docs.gitlab.com/ee/ssh/

      Show
      (Proving that GitLab is set up correctly. This first scenario will use a CRW-generated key and will have no problems.) Set up a GitLab project, mark it as non-public Open a new CRW workspace (of arbitrary type, I use Vert.x) and attempt to import the project. It should fail, because GitLab is protecting it. Go to CRW's Profile/Preferences/SSH/VCS section. Generate a new key. Copy the key, insert it in GitLab (Settings/SSH Keys) Try again to import the project, it should work. The SSH keys have allowed access. (Now to see the failure) Remove the prior keys from GitLab and CRW, so they won't mask the problem From the command line, generate a key for use. GitLab offers preferences for this at [1] . Set up a new workspace. Instead of generating a key, use the 'upload' function to upload the private key generated in the last step. Go to GitLab, add the public key generated two steps ago. Try to import the project in CRW. It will fail. This is the problem. //Gitlab offers preferences for key generation [1] https://docs.gitlab.com/ee/ssh/

      GitLab offers SSH authentication, but this seems broken when a user-supplied key is used. Please investigate / fix.

        1. gitlab-ssh-import -project-fail.png
          153 kB
          Shmaraiev Oleksandr
        2. upload-ssh-import-project-fail.png
          164 kB
          Shmaraiev Oleksandr

              vparfono Vitalii Parfonov
              rhn-support-rick Rick Wagner
              Votes:
              1 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated:
                Resolved: