Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
mutachre opened this issue Jul 1, 2022 · 6 comments
Closed

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

mutachre opened this issue Jul 1, 2022 · 6 comments

Comments

@mutachre
Copy link

mutachre commented Jul 1, 2022

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 mutachre changed the title [Bug]: [Bug]: "fatal: Could not read Username: Device Not Configured" Jul 2, 2022
@peterkaminski
Copy link

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

@mutachre
Copy link
Author

mutachre commented Jul 4, 2022

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.

@Vyeche
Copy link

Vyeche commented Aug 29, 2022

Interesting, I got it close. I used the first link on switching to SSH.

I followed:

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.

@wenlzhang
Copy link

  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.

@Vyeche
Copy link

Vyeche commented Mar 13, 2023

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

@abrahamp47
Copy link

abrahamp47 commented Nov 5, 2024

Interesting, I got it close. I used the first link on switching to SSH.

I followed:

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.

Hey @Vyeche ,
Just add this in your ssh config file -

Host github.com
StrictHostKeyChecking no
AddKeysToAgent yes
UseKeychain yes
IdentityFile ~/.ssh/id_ed25519

@Vinzent03 Vinzent03 closed this as not planned Won't fix, can't repro, duplicate, stale Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants