4

I have a project and want to get all dependecies with yarn on Linux. When I use

yarn install

I am getting the following error:

#yarn install
yarn install v0.27.5
[1/4] Resolving packages...
[2/4] Fetching packages...
error Command failed.
Exit code: 128
Command: git
Arguments: clone http://example.org/git/my_example.git /usr/local/share/.cache/yarn/v1/.tmp/05a8813322130c7dd3080dc68b6c6680
Directory: /home/user/my_project
Output:
Clone to '/usr/local/share/.cache/yarn/v1/.tmp/05a8813322130c7dd3080dc68b6c6680' ...
fatal: could not read Username for 'http://example.org': terminal prompts  disabled
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

The link at the end doesn't helped. I searched a little bit and set the environment variable GIT_TERMINAL_PROMPT before executing the command:

env GIT_TERMINAL_PROMPT=1 yarn install

like proposed here: go get results in 'terminal prompts disabled' error for github private repo

The use of the credential cache doesn't work because I have not a cloned repository, this should be cloned by yarn.

But the result is the same. What can I do to get this issue working?

phd
  • 82,685
  • 13
  • 120
  • 165
Chris
  • 427
  • 4
  • 13
  • Is `http://example.org`... the actual link you're using, or did you change it in the question? – Kraylog Aug 01 '17 at 09:18
  • Did you try using an ssh endpoint instead of the http one? – Kraylog Aug 01 '17 at 10:21
  • That is currently not possible as this doesn't support our git server (we have one under Windows which serves the repositories via IIS). – Chris Aug 01 '17 at 11:39
  • 1
    I've worked around this by using the following `"package-name": "git+https://:x-oauth-basic@github.com//.git"`. See: https://stackoverflow.com/a/28729646/5199198 – Pat Migliaccio Aug 14 '18 at 21:10

0 Answers0