Obsidian git- unable to push

What I’m trying to do

I have installed Obsidian Git, and whilst I am able to commit changes from Obsidian, and push to origin using Github Desktop, I am unable to push directly from Obsidian.

When I try to push from Obsidian, the following error message occurs:

‘Pushing to https://github.com/lucyanna/Obsidian_git_backup.git fatal: could not read Username for ‘https://github.com’: Device not configured’

Things I have tried

  • Restarting Mac
  • Pushing separately vs using the create backup hotkey

Any help would be greatly appreciated!

Please take a look at the following links to see if any of the workarounds or suggestions work:

Hi, I’ve tried changing the remote URL to SSH, but it still displays the same error message?

I’ve also searched online, and there are some suggestions to ‘do chmod 600 ~/.ssh/config’.

However I’m confused as to the exact steps to do this and would be grateful if you could please help to explain it?

Link to the thread: Not able to push · Issue #39 · denolehov/obsidian-git · GitHub

Dear @lucyanna, the plugin does not support SSH, leaving only Oauth available.

  1. You must first create a key on: Sign in to GitHub · GitHub

  2. Then you must use your github username and the token generated on github as the password on the settings for the git plugin in obsidian itself.

Please take into account that you must clone the repo first in a computer with https and not with git, (for the git clone will try to authenticate with a key and not with the token we just generated) and then copy that folder through USB or whatever method you prefer to the phone, then do the steps above.

Please refer to the following guide: https://www.reddit.com/r/ObsidianMD/comments/17odzjb/obsidian_android_syncing_via_github_in_2023/