惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

美团技术团队
阮一峰的网络日志
阮一峰的网络日志
T
The Blog of Author Tim Ferriss
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
宝玉的分享
宝玉的分享
L
LangChain Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Last Week in AI
Last Week in AI
博客园 - 司徒正美
M
MIT News - Artificial intelligence
人人都是产品经理
人人都是产品经理
WordPress大学
WordPress大学
B
Blog RSS Feed
H
Hackread – Cybersecurity News, Data Breaches, AI and More
博客园 - Franky
B
Blog
V
V2EX
J
Java Code Geeks
D
Docker
博客园 - 叶小钗
The Cloudflare Blog
量子位
博客园_首页
MongoDB | Blog
MongoDB | Blog

博客园 - googlegis

npm install 指定安装源 windows 下 CodeX 提示 Computer Use plugins unavailable 使用gzip压缩3dtiles Cesium 加载 3dtiles 优化方案 docker 删除 容器和镜像 docker 下安装 gitlab EE docker 在 linux 下的安装及使用 npm/npx 指定源 根据经纬度获取地形数据高程 GeoServer加载shp文件后中文乱码 Cesium中glb模型颜色暗淡解决 mongod.service failed with result exit-code npm、pnpm系统禁止了脚本的执行 当前计算机配置不支持 wsl2--已解决 hexo 推送需要github的用户名 el-switch 初始化时触发切换 使用vim修改linux中的文件 在 wsl2 中安装redis wsl 安装 Module '"element-plus"' has no export memeber 'ElMessage'. Did you mean to user 'import ElMessage from "element-plus" CodeBlocks window下安装后找不到编译器 CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory Error message "error:0308010C:digital envelope routines::unsupported"
Bad owner or permissions on /var/lib/jenkins/.ssh/config
googlegis · 2026-02-04 · via 博客园 - googlegis

The errors "Bad owner or permissions on /var/lib/jenkins/.ssh/config" and "fatal: Could not read from remote repository" indicate an issue with the permissions for the SSH configuration file or the SSH key used by the Jenkins user, preventing access to the remote repository. 

Cause

The SSH client is strict about the permissions for configuration files and private keys. If these files are accessible by users other than the owner, the SSH client will refuse to use them for security reasons [3, 4]. 

Solution Steps

To fix this, adjust the permissions of the relevant files and directories to be private to the jenkins user: 

  1. Access the server: Log into the machine running Jenkins with sufficient privileges (e.g., using sudo).
  2. Ensure correct ownership: Verify the jenkins user owns the files and the .ssh directory.

    bash

    sudo chown -R jenkins:jenkins /var/lib/jenkins/.ssh
    
  3. Set directory permissions: The .ssh directory should have permissions that only allow the owner to read, write, and execute (enter) it.

    bash

    sudo chmod 700 /var/lib/jenkins/.ssh
    
  4. Set config file and private key permissions: The config file and any private key files (commonly id_rsa or similar names) must be readable and writable only by the owner.

    bash

    sudo chmod 600 /var/lib/jenkins/.ssh/config
    # Repeat for your private key file, e.g.:
    sudo chmod 600 /var/lib/jenkins/.ssh/id_rsa
    
  5. Test connection (optional but recommended): Switch to the jenkins user and attempt to connect to your repository host to confirm the fix.

    bash

    sudo su - jenkins
    ssh -T git@your_repository_host # Replace with your actual host
    exit # to return to your previous user session
     

After applying these permission changes, the Jenkins job should be able to connect to the remote repository and the error messages should no longer appear.