obsidian-git
obsidian-git copied to clipboard
[Bug]: Updating Github personal access tokens
Describe the bug
Github adds a limit to the fine-grained Personal Access Tokens, expiring them after a year (max limit). Once they are expired and regenerated, how do I update these in the plugin? I couldn’t find an option to update/reauthenticate via the command palette.
Relevant errors (if available) from notifications or console (CTRL+SHIFT+I)
No response
Steps to reproduce
Wait for tokens to expire, update/create new one on Github.
Expected Behavior
- Add a way to update the tokens if needed
- Add a note in documentation
Addition context
No response
Operating system
macOS
Installation Method
None
Plugin version
2.24.0
Does the authentication already fail, or are you still able to push/pull. If not, please share any error messages. May you share your global git config without personal information to see which credential helper you use?
Had the same "problem". I don't think it's a bug, but I couldn't find any config about the token in the plugin, or instructions about replacing it.
I just replaced the old token with a new one directly in the .git/config file (for the vault repository). It worked just fine. Was there a way to update the token inside the plugin? Or was this the expected way to do it?
On Windows, the UN/PW authentication flow triggered by the extension wasn't working for me. I followed the recommendations at https://aka.ms/gcm/credstores and switched to using DPAPI protected file.
I set this by opening my vault in the Windows Terminal and running the below command:
git config credential.credentialStore dpapi
Then in my vault, I ran the "Git: push" command and instead of UN/PW it started a browser authentication flow.