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

Unable to access .git/config #51

Open
pirachute opened this issue Dec 29, 2023 · 18 comments
Open

Unable to access .git/config #51

pirachute opened this issue Dec 29, 2023 · 18 comments

Comments

@pirachute
Copy link

pirachute commented Dec 29, 2023

Hello,

On Windows 11 I get this error:

Unable to access .git/config

Screenshot 2023-12-29 123846

EDIT: I thought I had discovered the reason, but I didn't. :

I thought the plugin was not using the .git/config on my graphs folder:

C:\my_path\my_graph_folder\.git

Instead it was using a .git on the Logseq app folder:

C:\Users\my_user\.logseq\git\Ccomma_Users_my_user_Documents_Logseq_my_graph_name\.git

This folder was empty... when I copied the .git/config file on it, it stopped giving the error when I start Logseq, but after a while using it, it came back...

Any ideas on how to solve this problem?

@pirachute
Copy link
Author

I can confirm that copying all the contents in the Graph's .git into the Logseq plugin's .git helps reduce the problem's rate, but doesn't entirely solve the problem... Still, it doesn't make sense having to manually set a copy of the .git folder somewhere else... I consider this a bug =P... I hope it helps!

@alwinnat
Copy link

Hello @pirachute,

I had the same issue. In my case an additional remote repository caused the problem. I created one locally which I deleted afterwards. But I forgot to remove it from the git configuration.

git remote -v

image

@pirachute
Copy link
Author

Hi @alwinnat !

Thank you very much for your reply!! I used git remote -v and I don't seem to get any additional remote repositories.

I get this:

C:\my_graph_path> git remote -v
origin  [email protected]:my_user/my_graph.git (fetch)
origin  [email protected]:my_user/my_graph.git (push)

I also checked my .git/config and I see no references to other repositories...

I also tried adding full permissions for "Everyone", which in Windows is a very rare thing to do... still no luck.

Am I missing something?

@pirachute
Copy link
Author

I continue getting a constant stream of these errors:

image

@alwinnat
Copy link

Hello @pirachute,

same here! It seems, there is a race condition problem with .git\config.

I took a look with Process Monitor and found following git commands, Logseq executes:

image

You can find it in the source code of Logseq at HERE.

I have no clue, why it is necessary to set core.safecrlf after every call of git status, commit, pull, ... . This is a question for the devs!

@pirachute
Copy link
Author

Thanks @alwinnat ,

That's very weird indeed...

At least I'm not the only one with the problem hehe... I guess we'll wait for the devs to see what they say then.

In the meantime, happy new year!

@pranaysy
Copy link

pranaysy commented Jan 1, 2024

I can confirm that I have the exact same issue on Logseq v0.10.3 running logseq-plugin-git v1.5.5 on Windows 10 with git v2.43.0.windows.1

@alwinnat
Copy link

alwinnat commented Jan 3, 2024

Hello @pirachute and @pranaysy,

have a Happy New Year, too!

I did a little digging and found Issue #10743. Since then, there have been some fixes.
I did some tests with a nightly build and did not get any errors regarding to '.git/config'.

@i--storm
Copy link

i--storm commented Jan 4, 2024

Confirm same error on Windows 11. It began to popup after last Logseq update

@DeeliN221
Copy link

Same error on Windows 10, it only occurs recently. I remember the new version > 0.10.1 made this plugin crashed for a few days before. Maybe related to that.

@clindsay-ol
Copy link

clindsay-ol commented Jan 10, 2024

I've been having this issue on Windows 11 and troubleshooting it as well. This only started after recently updating LogSeq, so perhaps this is due to changes in the new version. Thanks for keeping tabs on it.

I'm not sure why it would be setting core.safecrlf manually every time either; since Git integration is an unsupported "Advanced" feature, I think it would be safe to assume everyone has properly set their CRLF configurations globally as needed.

@clindsay-ol
Copy link

For what it's worth, in my troubleshooting I have also seen that LogSeq seems to set some files in the repository to read-only while it is running.

Changing the version control setting for the built-in Git support requires restarting the app, so perhaps this is to prevent config changes from causing problems in a running instance of LogSeq? Food for thought.

@clindsay-ol
Copy link

clindsay-ol commented Jan 10, 2024

With the Git plugin disabled and only the main integration enabled, I am now getting this error message:

image

I am assuming that the native integration now locks the file while LogSeq is running.

Update: core.bare = false is already explicitly set in my .git/config file for this repo.

@StepanKuklis
Copy link

Hello, I would gladly send a few bucks somewhere as a thanks for the plugin and the possibility of fixing this. The plugin is saving me time and making my life easier.

@StepanKuklis
Copy link

Just updated to Logseq 0.10.4 and the error is gone! (w10)
(the offer of donation still lasts)

@AI-Ahmed
Copy link

Just updated to Logseq 0.10.4 and the error is gone! (w10) (the offer of donation still lasts)

But the problem still remaining, Git doesn't automatically push

@gvlx
Copy link

gvlx commented Jan 23, 2024

I had the exact same problem, but it has vanished since v0.10.5

I had remove the folder %USERPROFILE%\.logseq\git but it has been recreated. (why does it exists?)

@AI-Ahmed
Copy link

I had the exact same problem, but it has vanished since v0.10.5

I had remove the folder %USERPROFILE%\.logseq\git but it has been recreated. (why does it exists?)

The issue of commit & pushing is partially solved, but still, you have to commit & push manually!

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

9 participants