-
Notifications
You must be signed in to change notification settings - Fork 18
Description
Describe the bug
When setting up the plugin on a new Obsidian instance for the first time, it fails with a 401 Bad credentials error. This occurs even when the Personal Access Token (PAT), username, and repository details are all confirmed to be correct. Subsequent syncs work perfectly after applying a manual workaround.
To Reproduce
- Install the
github-gitless-syncplugin on a fresh installation of Obsidian. - Configure the plugin with a valid repository name, username, and a PAT with the correct permissions.
- Attempt the first sync.
- Observe the
401error in the logs.
Expected behavior
The initial sync should complete successfully without any credential errors, cloning the remote vault content.
Actual behavior
The sync fails, and the following error is logged, indicating a credential issue:
{
"timestamp": "2025-10-16T00:14:36.607Z",
"level": "ERROR",
"message": "Failed to get repo content",
"additional_data": {
"status": 401,
"json": {
"message": "Bad credentials",
"documentation_url": "https://docs.github.com/rest",
"status": "401"
}
}
}Workaround and Additional Context
I was able to resolve the issue with the following steps:
- Manually copied my existing
.obsidianconfiguration folder into the new vault. - Reset the plugin's settings within Obsidian.
- Re-entered the same credentials (repository, username, PAT).
After performing this workaround, the sync functionality works as expected for all files except for the configuration folder, which seems to cause major issues when synced.
This initial hiccup seems to be the primary blocker for an otherwise killer plugin.