Skip to content

Git operations show warning when using credentials mounted by DWO #1121

@amisevsk

Description

@amisevsk

Description

When git credentials are added to a workspace (doc), the credentials file is necessarily mounted read-only to the workspace containers.

This causes git operations, both in the running workspace and in the project-clone init container, to log

fatal: unable to get credential storage lock in 1000 ms: Read-only file system

This message does not prevent the action from succeeding (i.e. the clone/fetch/push succeeds) but the message is confusing and suggests an unexpected error.

How To Reproduce

  1. Configure git credentials via personal access token as documented
  2. Start a workspace that clones a git repository
  3. Note project clone logs contain message listed above
  4. Attempt to git fetch within the cloned project, note error printed as above.

Expected behavior

We should find a way of either ignoring or suppressing this error.

One approach would be to

  1. Mount credentials to some other path, and
  2. Copy file to the path git expects with read-write permissions on startup
    However, this approach would prevent on-cluster updates to the git credentials from automatically propagating to the workspace, which is a requirement (see: Update how personal access token git credentials are mounted into workspaces #915)

Additional context

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions