obsidian-git: [Bug]: Error when automatically pushing to remote repo on GitHub
Describe the bug
Obsidian Git commits my changes (after file change and in regular intervals) as expected, but when Obsidian Git is trying to push them (automatically) to a remote repository on GitHub, it does not work and I get an error notification.
- No such file or directory
- could not read username.
When I manually push the changes (in terminal via “git push”) it works. That means my system/repo is connected to the remote.
Error Notification:
Relevant errors (if available)
See screenshot of the error notification above.
Steps to reproduce
- I initialized my obsidian vault as a git repo and set a github repo as a remote.
- Manually pushing changes from terminal after commit works.
- See Obsidian git settings below under “Additional context”.
Expected Behavior
I expect the changes to be pushed to the remote github repo as specified in the settings.
Addition context
Plugin Settings:
Operating system
Linux
Plugin version
2.9.4
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 2
- Comments: 19
A POSSIBLE SOLUTION?
I too were getting these
Username for 'https://github.com': No such device or address
errors.My solution was to change the Git Remote “origin” value from:
https://github.com/[USERNAME]/[REPO].git
togit@github.com:[USERNAME]/[REPO].git
in the Obsidian vault / Git repository. After that everything seemed to work fine.
Perhaps this could be added as a Tips & Tricks note or otherwise indicated in the documentation?
Same here!
write in the console in your directory
git remote set-url origin <remote_ssh_url>
. Worked for meInstalling Obsidian with AppImage instead Flatpak solved the issue for me.
I have the exact same issue. Same configuration as yours. Pushing from terminal works. gh is installed under usr/bin/gh and works in terminal (verified via “gh auth status”).