Skip to content
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

This tool does not install correctly as root user. #45

Open
CraigChamberlain opened this issue Oct 12, 2020 · 0 comments
Open

This tool does not install correctly as root user. #45

CraigChamberlain opened this issue Oct 12, 2020 · 0 comments

Comments

@CraigChamberlain
Copy link

In order access large media from a task runner, that may only run root, I have to install the netlify cli and the nlm plugin.

Original error can be reproduced via the following:

#On host
docker pull node:latest
docker run --rm  -it node  "/bin/sh"

#In container
SECRET_NETLIFY_AUTH_TOKEN="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash && apt-get install -y git-lfs
npm install netlify-cli -g
netlify plugins:install netlify-lm-plugin
netlify lm:install

# netlify lm:setup
  ✔ Checking Git version [2.11.0]
  ✔ Checking Git LFS version [2.12.0]
  ✔ Checking Git LFS filters
  ✖ Installing Netlify's Git Credential Helper for Linux
    → Unable to detect SHELL type, make sure the variable is defined in your environment
    Configuring Git to use Netlify's Git Credential Helper
Error: Unable to detect SHELL type, make sure the variable is defined in your environment
    at shellVariables (/root/.local/share/netlify-cli/node_modules/netlify-lm-plugin/lib/install.js:232:15)
    at setupUnixPath (/root/.local/share/netlify-cli/node_modules/netlify-lm-plugin/lib/install.js:138:23)
    at Task.task (/root/.local/share/netlify-cli/node_modules/netlify-lm-plugin/lib/install.js:74:19)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5) {
  context: [Object: null prototype] {}
}

Installing the helper via package manager:

#On host
docker pull node:latest
docker run --rm  -it node  "/bin/sh"

#In container
SECRET_NETLIFY_AUTH_TOKEN="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash && apt-get install -y git-lfs
npm install netlify-cli -g
netlify plugins:install netlify-lm-plugin
PACKAGE="git-credential-netlify-linux-amd64.deb"
curl -L -o $PACKAGE https://github.com/netlify/netlify-credential-helper/releases/download/v0.1.9/git-credential-netlify-linux-amd64.deb
dpkg -i $PACKAGE

netlify lm:install
...
✖ Configuring Git to use Netlify's Git Credential Helper
    → ENOENT: no such file or directory, open '/root/.netlify/helper/git-config'
Error: ENOENT: no such file or directory, open '/root/.netlify/helper/git-config'
    at Object.openSync (fs.js:474:3)
    at Object.writeFileSync (fs.js:1436:35)
    at configureGitConfig (/root/.local/share/netlify-cli/node_modules/netlify-lm-plugin/lib/install.js:212:8)
    at processTicksAndRejections (internal/process/task_queues.js:93:5) {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: '/root/.netlify/helper/git-config',
  context: [Object: null prototype] {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant