error: unable to unlink old ‘.gitlab-ci.yml‘: Permission denied

#gitlab-runner 执行代码git pull origin xxx 更新时候报 error: unable to unlink old '.gitlab-ci.yml': Permission denied

问题环境:centos 部署gitlab-runner 执行脚本方式 选的shell
产生问题的原因:gitlab-runner程序进程占用锁定了.gitlab-ci.yml

解决方法:gitlab-runner stop
停止服务后,切换到 执行gitlab-runner进程的用户,执行用户是:gitlab-runner 用户组也是:gitlab-runner

切换到用户:su gitlab-runner

进入到项目目录执行:git pull origin xxx 确认成功后,启动gitlab-runner 服务

启动gitlab-runner服务:gitlab-runner start

重新运行自动化部署任务确认成功

相关推荐
matlabgoodboy1 天前
Haskell Drracket OCaml Prolog 逻辑式编程函数式编程代写代做
vscode·ci/cd·docker
Anyexyz2 天前
Vscode/Code-Server 安装中文包——CI/CD
ide·vscode·ci/cd
极小狐3 天前
如何创建并使用极狐GitLab 受保护标签?
数据库·ci/cd·gitlab·devops·mcp
试着3 天前
【AI面试准备】Git与CI/CD及单元测试实战指南
git·ci/cd·面试
hlsd#4 天前
轻松实现CI/CD: 用Go编写的命令行工具简化Jenkins构建
运维·ci/cd·go·jenkins
极小狐6 天前
如何创建极狐GitLab 私密议题?
数据库·ci/cd·gitlab·devops·mcp
韶君8 天前
Jenkins(CI/CD工具)
ci/cd·jenkins
极小狐8 天前
如何使用极狐GitLab 的外部状态检查功能?
数据库·ci/cd·gitlab·devops·mcp
极小狐8 天前
如何对极狐GitLab 议题进行过滤和排序?
人工智能·git·机器学习·gitlab
极小狐8 天前
如何创建并使用极狐GitLab 部署令牌?
运维·git·ssh·gitlab·github