git-mob-vs-code icon indicating copy to clipboard operation
git-mob-vs-code copied to clipboard

error message: `EACCES: permission denied, open '../.gitmessage'`

Open haakon-e opened this issue 1 year ago • 8 comments

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 git if 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

haakon-e avatar May 17 '24 21:05 haakon-e

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.

File permissions

rkotze avatar May 25 '24 12:05 rkotze

I get the same error here. The .gitmessage file is present in the user's home dir and has 644 perms.

silopolis avatar Jun 18 '24 07:06 silopolis

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?

rkotze avatar Jun 24 '24 18:06 rkotze

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?

Captura de pantalla 2024-06-26 a las 21 32 48

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.

davideluque avatar Jun 26 '24 19:06 davideluque

Do you use git mob cli and do you see the same issue?

rkotze avatar Jun 27 '24 21:06 rkotze

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.

davideluque avatar Jun 30 '24 16:06 davideluque

Same issue

dylanspyer avatar Jul 02 '24 13:07 dylanspyer

tl;dr

Workaround for v1.20.0

  1. Run this in your terminal
git config --global commit.template ~/.gitmessage
  1. 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.

shajz avatar Jul 03 '24 21:07 shajz

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.

rkotze avatar Aug 10 '24 14:08 rkotze