摘要: 1、创建账号文件 2、添加脚本 echo "执行脚本"pwdgit config --global credential.helper "store --file=/root/jenkins/credential_file"echo "获取提交信息"commit_hash=$(git log -n 阅读全文
posted @ 2023-12-01 15:04 扰扰 阅读(121) 评论(0) 推荐(0) 编辑
摘要: 在 Jenkins 中使用 shell 脚本提交 Git 指令时,你可以通过使用 Git 凭据信息来进行认证。这可以通过以下步骤来实现: 设置 Git 凭据: 在 Jenkins 中,你可以在“凭据”(Credentials)中添加 Git 的用户名和密码。在 Jenkins 主界面,点击“凭据”- 阅读全文
posted @ 2023-12-01 14:03 扰扰 阅读(412) 评论(0) 推荐(0) 编辑