obsidian-git
obsidian-git copied to clipboard
[Bug]: "fatal: Could not read Username: Device Not Configured"
Describe the bug
I'm getting the error "fatal: Could not read Username for 'https://www.github.com/': Device Not Configured" everytime Obsidian tries to push. I'm running on OS X Monterey 12.1 / Apple M1. Any idea how to solve?

Relevant errors (if available)
No response
Steps to reproduce
Auto or manual commit.
Expected Behavior
No response
Addition context
No response
Operating system
macOS
Plugin version
1.26.1
In my experience, this isn't an Obsidian Git problem, it just means authentication isn't set up.
There are two paths forward:
- If you use Git from the command-line or another app, and you have a GitHub SSH key set up, you need to switch your remote URL from HTTPS to SSH.
- Otherwise, you need to cache your Git credentials. I haven't done this, but I can include some links to pages that might help below (no guarantees).
- How to Set Up HTTPS Personal Access Tokens for Github Authentication
- Caching your GitHub credentials in Git - GitHub Docs
- Updating credentials from the macOS Keychain - GitHub Docs
- Creating a personal access token - GitHub Docs
- Git - Credential Storage (note, refers to "Git Credential Manager for Windows"; however, "Warning: Older versions of Git for Windows came with Git Credential Manager for Windows. This older product is no longer supported and cannot connect to GitHub via OAuth. We recommend you upgrade to the latest version of Git for Windows.")
Thank you. Apparently it seems to be solved by switching from https to ssh, probably the issue was triggered by 2FA. This is my first time using an ssh key, I will try to test it some more.
Interesting, I got it close. I used the first link on switching to SSH.
I followed:
- SSH New Key
- https://askubuntu.com/questions/1196164/ssh-askpass-exec-usr-libexec-openssh-ssh-askpass-no-such-file-or-directory-e
Uncaught (in promise) Error: ssh_askpass: exec(/usr/bin/ssh-askpass): No such file or directory
Host key verification failed.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
After I install SSH_ASKPass. I'm getting a prompt.
I may have messed up this step.
sh-keyscan -t rsa github.org >> ~/.ssh
The example that was given:
ssh-keyscan -t rsa bitbucket.org >> ~/.ssh/known_hosts
plugin:obsidian-git:10399 Uncaught (in promise) Error: Host key verification failed.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
- If you use Git from the command-line or another app, and you have a GitHub SSH key set up, you need to switch your remote URL from HTTPS to SSH.
This worked for me.
In my experience, this isn't an Obsidian Git problem, it just means authentication isn't set up.
There are two paths forward:
- If you use Git from the command-line or another app, and you have a GitHub SSH key set up, you need to switch your remote URL from HTTPS to SSH.
- Otherwise, you need to cache your Git credentials. I haven't done this, but I can include some links to pages that might help below (no guarantees).
- How to Set Up HTTPS Personal Access Tokens for Github Authentication
- Caching your GitHub credentials in Git - GitHub Docs
- Updating credentials from the macOS Keychain - GitHub Docs
- Creating a personal access token - GitHub Docs
- Git - Credential Storage (note, refers to "Git Credential Manager for Windows"; however, "Warning: Older versions of Git for Windows came with Git Credential Manager for Windows. This older product is no longer supported and cannot connect to GitHub via OAuth. We recommend you upgrade to the latest version of Git for Windows.")
Solved my issue: Caching your GitHub credentials in Git - GitHub Docs