jenkinsci / jenkinsci/workflow-api-plugin
[JENKINS-33126] unstash fails to overwrite read-only files
- Dominant language
- Java
- Stars
- 31
- Forks
- 80
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 1
Description
We're using stash & unstash to pass a checked out git repository between steps in our workflow.
On first run the unstash works successfully, however on a second run the unstash fails because some of the files in the `.git` directory are read-only.
I've attached the stack trace, it's a bit misleading, we've fixed it by running a `sh 'chmod -R u+w .git'` before the unstash step.
---
Originally reported by mcobden, imported from: unstash fails to overwrite read-only files
jglick
Raw content of original issue
We're using stash & unstash to pass a checked out git repository between steps in our workflow.
On first run the unstash works successfully, however on a second run the unstash fails because some of the files in the `.git` directory are read-only.I've attached the stack trace, it's a bit misleading, we've fixed it by running a `sh 'chmod -R u+w .git'` before the unstash step.
1 attachment
- [stacktrace.txt](https://raw.githubusercontent.com/jenkinsci/attachments-from-jira-issues-last/refs/heads/main/attachments/32032/stacktrace.txt)
Contributor guide
Assessment
This issue has not been assessed yet.