jenkinsci / jenkinsci/workflow-api-plugin

[JENKINS-33126] unstash fails to overwrite read-only files

Open
#469 11 comments 0 reactions 0 assignees View on GitHub
component:workflow-api-plugin imported-jira-issue priority:minor resolution:unresolved
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


  • assignee: jglick
  • status: Open
  • priority: Minor
  • component(s): workflow-api-plugin
  • resolution: Unresolved
  • votes: 32
  • watchers: 27
  • imported: 20260601-173816

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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.