error message: `EACCES: permission denied, open '../.gitmessage'`
Prerequisites
- [x] Checked that your issue isn't already filed
- [?] Tried upgrading to the latest git-mob-vs-code and git-mob version (
npm i -g git-mob) -- installed via VSCode marketplace - [?] Tried upgrading to the latest git version (
brew upgrade gitif installed with Homebrew/Linuxbrew) -- constrained by my cluster environment
Description
Whenever I open VSCode, I get error messages like:
EACCES: permission denied, open '../.gitmessage'
EROFS: read-only file system, open '../../../../.gitmessage'
Expected behaviour: [What you expect to happen]
no message -- everything is fine!
Actual behaviour: [What actually happens]
Not sure what it actual implies about the extension?
Reproduces how often: [What percentage of the time does it reproduce?]
Every time I open VScode
Versions
- operating system and version:
- VS Code version
Version: 1.89.1 (Universal)
Commit: dc96b837cf6bb4af9cd736aa3af08cf8279f7685
Date: 2024-05-07T05:14:24.611Z
Electron: 28.2.8
ElectronBuildId: 27744544
Chromium: 120.0.6099.291
Node.js: 18.18.2
V8: 12.0.267.19-electron.0
OS: Darwin arm64 23.4.0
- git-mob-vs-code version (can be found in the Extensions tab): v1.20.0
- git version (
git --version):git version 2.39.3
Additional Information
Hi @haakon-e
It is strange to see this error.
It looks like the file does not have the correct file permissions for git-mob to modify it.
Make sure the file has write permissions.
I get the same error here.
The .gitmessage file is present in the user's home dir and has 644 perms.
Very strange, I can't reproduce.
I wonder if anyone else is having this issue.
Have you tried to delete the .gitmessage file then reload the git mob extension?
Very strange, I can't reproduce.
I wonder if anyone else is having this issue.
Have you tried to delete the .gitmessage file then reload the git mob extension?
I am not sure how .gitmessage works but is it always a file in ~/ ? I don't have that file there and the error appeared out of nowhere. Intel Mac user here.
Do you use git mob cli and do you see the same issue?
Do you use git mob cli and do you see the same issue?
I have no issues with the CLI, although I only use the VSCode Extension.
Same issue
tl;dr
Workaround for v1.20.0
- Run this in your terminal
git config --global commit.template ~/.gitmessage
- Reload vscode
Got it working by downgrading the extension to the previous release (v1.19.0).
Something must have changed regarding the handling of .gitmessage in the v1.20.0 release.
After inspecting changes in diffs for the vscode extension (https://github.com/rkotze/git-mob-vs-code/compare/v1.19.0...v1.20.0) and the core dependency (https://github.com/rkotze/git-mob/compare/v2.4.1...v3.2.2), I tried to set the git config commit.template to ~/.gitmessage and it worked!
Not sure what the problem is but that could point @rkotze in the right direction to reproduce, maybe you already had that in your .gitconfig file?
EDIT: Weird thing is now I can remove the commit.template config and everything still works 🤔 Not sure why.
I was able to reproduce the error and hopefully this issue is now fixed with the release of v1.20.1
Thank you all for capturing this issue and patience.