jenkinsci / jenkinsci/credentials-binding-plugin
[JENKINS-58845] Jenkins Docker Desktop git ssh temporary credentials file bad permissions
- Dominant language
- Java
- Stars
- 57
- Forks
- 108
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
i have the following error message when trying to access my gitlab server via ssh from my jenkins:
stdout:
stderr: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0555 for '/var/jenkins_home/caches/git-0aa16db65c903d3ced737f801b217112@tmp/jenkins-gitclient-ssh2425211278542515051.key' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
Load key "/var/jenkins_home/caches/git-0aa16db65c903d3ced737f801b217112@tmp/jenkins-gitclient-ssh2425211278542515051.key": bad permissions
Permission denied (publickey).
fatal: Could not read from remote repository.
My environment is the following:
Host System: Windows 10
Docker Desktop 2.1.0 with Linux based containers
Jenkins Docker Container: jenkins/jenkins and jenkins/jenkins:lts
I've a similar setup running with a linux for Docker and there isn't the same problem.
For testing purposes i've installed the latest beta version (3.0.0-beta10) of the "git client plugin" as suggestet in the comment of https://issues.jenkins-ci.org/browse/JENKINS-53933. But this didn't solve the problem.
I'm not sure if the credentials-binding-plugin is the right component for this.
It seems that other people have the same problem. e.g. The comment at the bottom of https://wiki.jenkins.io/display/JENKINS/SSH+Credentials+Plugin .
---
Originally reported by cobba, imported from: Jenkins Docker Desktop git ssh temporary credentials file bad permissions
Raw content of original issue
Hi,
i have the following error message when trying to access my gitlab server via ssh from my jenkins:
stdout:
stderr: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0555 for '/var/jenkins_home/caches/git-0aa16db65c903d3ced737f801b217112@tmp/jenkins-gitclient-ssh2425211278542515051.key' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
Load key "/var/jenkins_home/caches/git-0aa16db65c903d3ced737f801b217112@tmp/jenkins-gitclient-ssh2425211278542515051.key": bad permissions
Permission denied (publickey).
fatal: Could not read from remote repository.My environment is the following:
Host System: Windows 10
Docker Desktop 2.1.0 with Linux based containers
Jenkins Docker Container: jenkins/jenkins and jenkins/jenkins:lts
I've a similar setup running with a linux for Docker and there isn't the same problem.
For testing purposes i've installed the latest beta version (3.0.0-beta10) of the "git client plugin" as suggestet in the comment of https://issues.jenkins-ci.org/browse/JENKINS-53933. But this didn't solve the problem.
I'm not sure if the credentials-binding-plugin is the right component for this.
It seems that other people have the same problem. e.g. The comment at the bottom of https://wiki.jenkins.io/display/JENKINS/SSH+Credentials+Plugin .
environment
```
Windows 10 + Docker Desktop
jenkins/jenkins docker image
```
Contributor guide
Assessment
This issue has not been assessed yet.