obsidian-git icon indicating copy to clipboard operation
obsidian-git copied to clipboard

[Bug]: "fatal: Could not read Username: Device Not Configured"

Open mutachre opened this issue 2 years ago • 5 comments

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?

Schermata 2022-07-01 alle 13 52 28

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

mutachre avatar Jul 01 '22 23:07 mutachre

In my experience, this isn't an Obsidian Git problem, it just means authentication isn't set up.

There are two paths forward:

  1. 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.
  2. 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).

peterkaminski avatar Jul 03 '22 22:07 peterkaminski

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.

mutachre avatar Jul 04 '22 07:07 mutachre

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

Screenshot 2022-08-28 9 03 11 PM

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.

Vyeche avatar Aug 29 '22 00:08 Vyeche

  1. 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.

wenlzhang avatar Dec 21 '22 18:12 wenlzhang

In my experience, this isn't an Obsidian Git problem, it just means authentication isn't set up.

There are two paths forward:

  1. 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.
  2. 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).

Solved my issue: Caching your GitHub credentials in Git - GitHub Docs

Vyeche avatar Mar 13 '23 21:03 Vyeche