Permission denied (Publickey) in Git while running pipline in Jenkins

Asked

Viewed 20 times

0

Blz, everybody?

A very strange situation here:

I can build a particular image in Openshift normally but, when trying the same build, with the same repository, in my pipe in Jenkins, he informs me:

Permission denied (publickey). Fatal: Could not read from remote.

See the difference between Pipe logs in Openshift and Jenkins, respectively:

Cirrus:

    STEP 12: RUN yarn install --production=false
yarn install v1.21.1
[1/4] Resolving packages...
[2/4] Fetching packages...
info [email protected]: The platform "linux" is incompatible with this module.
warning " > [email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > [email protected]" has unmet peer dependency "webpack@^3.0.0 || ^4.0.0".
[4/4] Building fresh packages...

See that he "passes" well. Now, in Jenkins...

    Step 12/46 : RUN yarn install --production=false
 ---> Running in 8071da549376

yarn install v1.21.1
[1/4] Resolving packages...

[2/4] Fetching packages...

[91merror Command failed.
Exit code: 128
Command: git
Arguments: ls-remote --tags --heads [email protected]:myRepo.git
Directory: /app
Output:
Warning: Permanently added the ECDSA host key for IP address 'xxxxxxxxxx' to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.

In both environments, within the Yarn.lock file, Pipes reference the same repository: [email protected]:myRepo.git

I would understand it to be a permissions problem, keypair or something like that on github (and it is, in fact, what it looks like). But what doesn’t make sense is the same build, using the same repository, showing permission error only on Jenkins.

I checked the plugins update on Jenkins; I disabled 'lightweight checkout';

Doesn’t work.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.