Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git hooks permissions #326

Open
mfoulds opened this issue Apr 5, 2023 · 1 comment
Open

git hooks permissions #326

mfoulds opened this issue Apr 5, 2023 · 1 comment

Comments

@mfoulds
Copy link

mfoulds commented Apr 5, 2023

Summary;

  1. git repositories need +x permissions on all files in .git/hooks in order to push.
  2. permissions are not maintained in Onedrive
  3. so must run chmod +x ./.git/hooks/* per session
  4. any ideas for a more stable solution?

I have a repository located in onedrive. The files all synchronize perfectly with Onedriver. However there is a problem whenever pushing or triggering any kind of git hooks.

For example, when attempting to push, I get this error:

$ git push
fatal: cannot exec '.git/hooks/pre-push': Permission denied

The solution I've found is to run chmod +x ./.git/hooks/* from the project directory. The changes apply for the duration of the session, but must be repeated in a new session.

Can anyone think of a more stable solution?

@jstaf
Copy link
Owner

jstaf commented Jun 24, 2023

As you've found out, the issue is that file permissions are not persistent, because OneDrive doesn't have a concept of file permissions where we could store them. It would be nice if we could somehow make permissions persistent somehow. One possible solution would be making everything executable by default, but there might be a more elegant way to do this (I'll have to think on this).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants