Using CircleCI CLI and yarn install contains git+ssh

ssh
github
git
2.0

#1

I am using CircleCI (2.0) CLI, but if yarn install contains git+ssh://git@github.com/XXX/XXX in package.json dependencies, circleci build will fail.
There is no problem check out the source code of the GitHub’s project.
I would like to use the same secret key that is used for this checkout.
Is there any solution?

(...omission)
====>> yarn install
  #!/bin/bash -eo pipefail
yarn install
yarn install v0.27.5
[1/4] Resolving packages...
[2/4] Fetching packages...
The authenticity of host 'github.com (192.30.255.113)' can't be established.
RSA key fingerprint is xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx.
Are you sure you want to continue connecting (yes/no)? yes
Error: Too long with no output (exceeded 10m0s)
Step timedout
====>> Uploading test results
Error: Unable to save test results from /tmp/test-results
Error stat /tmp/test-results: no such file or directory

Error: Found no path with test results, skipping
Task failed

This is part of package.json. If I delete this git + ssh, the process proceeds without timeout.

  "dependencies": {
    "@angular/common": "4.0.1",
...
    "private-module": "git+ssh://git@github.com/xxx/xxxxxx.git#v1.0.0",
...

#2

We used to have a private dependency and did something like this:

- perl -pi -w -e "s|git\+ssh://git\@github.com/<GITHUB_PROJECT>/|git\+https://$GITHUB_TOKEN:x-oauth-basic\@github.com/<GITHUB_PROJECT>/|g" package.json

where <GITHUB_PROJECT> is your private github project.


#3

I tried it, but why was not the authentication going well.
Perhaps, I think there is a problem with $ GITHUB_TOKEN I generated, but I understood your intention.
Thank you for your advise.


#4

I’m sorry for the late reply.
I tried it with an access token that allowed all the control, and it worked without problems. I’m really thankful to you!!!


#5

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.