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

Cloning private repo in VS Code editor throw error "Cannot find module 'vscode'"

XMLWordPrintable

    • False
    • None
    • False
    • Workaround Exists
    • Hide

      1. Use ssh for clone
      2. Use git clone https://user:pass@github.com/user/private-repo

      Show
      1. Use ssh for clone 2. Use git clone  https://user:pass@github.com/user/private-repo

      Description of problem:

      If the user will try to clone private repository through terminal in default editor which is VC Code, instead of get a question about username and password like it is in Che-Theia user will get an error: "Error: Cannot find module 'vscode'".

      Prerequisites (if any, like setup, operators/versions):

      DevSpaces deployed on OpenShift Cluster.

      Steps to Reproduce

      1. Create workspace with VS Code editor, for  example "Empty Workspace"
      2. Open workspace
      3. Go to terminal and try to clone private repo with https: "git clone https://github.com/user/private-repo"

      Actual results:

      Cloning into 'private-repo'...
      node:internal/modules/cjs/loader:936
        throw err;
        ^Error: Cannot find module 'vscode'
      Require stack:
       - /checode/checode-linux-libc/extensions/git/dist/askpass-main.js
          at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
          at Function.Module._load (node:internal/modules/cjs/loader:778:27)
          at Module.require (node:internal/modules/cjs/loader:1005:19)
          at require (node:internal/modules/cjs/helpers:102:18)
          at Object.7549 (/checode/checode-linux-libc/extensions/git/dist/askpass-main.js:1:780)
          at r (/checode/checode-linux-libc/extensions/git/dist/askpass-main.js:1:896)
          at /checode/checode-linux-libc/extensions/git/dist/askpass-main.js:1:1012
          at /checode/checode-linux-libc/extensions/git/dist/askpass-main.js:1:2040
          at Object.<anonymous> (/checode/checode-linux-libc/extensions/git/dist/askpass-main.js:1:2146)
          at Module._compile (node:internal/modules/cjs/loader:1103:14) {
        code: 'MODULE_NOT_FOUND',
        requireStack: [ '/checode/checode-linux-libc/extensions/git/dist/askpass-main.js' ]
      }

      See full log attached

      Expected results:

      Cloning into 'private-repo'...
      Username for 'https://github.com': user
      Password for 'https://user@github.com': 
      fatal: unable to get credential storage lock in 1000 ms: Read-only file system
      remote: Enumerating objects: 7, done.
      remote: Counting objects: 100% (7/7), done.
      remote: Compressing objects: 100% (4/4), done.
      remote: Total 7 (delta 0), reused 0 (delta 0), pack-reused 0
      Receiving objects: 100% (7/7), done. 

      Reproducibility (Always/Intermittent/Only Once):

      Always

      Build Details:

      ocp 4.10, 4.11; Dev Spaces 3.3.0.RC-12-06

      Additional info (Such as Logs, Screenshots, etc):

      See attachments

      log.txt

              ivinokur-1 Igor Vinokur
              rh-ee-mdolhalo Maryna Dolhalova (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: