Paste the key, give it a title, and click Add SSH key
Use SSH in GitHub Desktop
Open GitHub Desktop
Go to File > Clone Repository
Select the URL tab and make sure it starts with:
git@github.com:username/repo.git (not https://)
This ensures GitHub Desktop can authenticate using your SSH key.
Clone the Repository with GitHub Desktop
Open GitHub Desktop.
Login and authenticate with oAuth (or your preferred method)
Go to File > Clone Repository.
Select the URL tab and enter your newly created repository url, making sure it starts with:
git@github.com:username/repo.git (not https://)
This ensures GitHub Desktop can authenticate using your SSH key.
Choose a local directory for the repository (e.g., ~/Documents/my-obsidian-vault).
Click Clone.
Set Up Obsidian
Open Obsidian.
Click Open folder as vault and select the local folder you cloned using GitHub Desktop.
Install Obsidian-Git Plugin
Go to Settings > Community Plugins in Obsidian.
Turn on Safe Mode if it’s off.
Click Browse and search for Obsidian Git.
Install and enable the Obsidian-Git plugin.
Configure Obsidian-Git
The plugin obsidian-git will interfere with GitSync, so you will need to disable it on your mobile devices!
This can easily be done by opening your Obsidian vault on your mobile device, scrolling to the bottom of the Git settings and enabling disable on this device
Go to Settings > Obsidian Git.
Set the following options:
Auto commit-and-sync interval (minutes): (e.g., 5 minutes).
Auto commit-and-sync after stopping file edits: Enabled.
Commit message on auto commit-and-sync: Customize or leave as default.
Pull on startup: Enabled.
Push on commit-and-sync: Enabled.
Pull on commit-and-sync: Enabled.
Save changes.
Step 7: Syncing Changes
Pulling Changes: On startup, Obsidian-Git automatically pulls changes from GitHub.
Pushing Changes: Obsidian-Git automatically commits and pushes changes based on the set interval.
You’re now set up to sync your Obsidian vault on Desktop!