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

No Authentication Section in Settings #426

Closed
mpfp opened this issue Jan 21, 2023 · 14 comments
Closed

No Authentication Section in Settings #426

mpfp opened this issue Jan 21, 2023 · 14 comments

Comments

@mpfp
Copy link

mpfp commented Jan 21, 2023

I don't see an Authentication section in the Settings. I'm on Windows and I have git installed and on the path (can use it on the command line). Where do I put an authentication token or password?

image

@ajmazz
Copy link

ajmazz commented Jan 21, 2023

Same. Macbook Air M1, OS Ventura 13.1

@Fnige
Copy link

Fnige commented Jan 23, 2023

Same here. Linux, Fedora 37, Flathub

@kevinnmark
Copy link

+1
Macbook Pro
OS Big Sur 11.7.2
Obsidian v.1.1.9 (Installer 0.15.9)

@albinotonnina
Copy link

Same, OSX, Version 1.1.9 (Installer 1.1.9)

@sawasawasawa
Copy link

sawasawasawa commented Jan 29, 2023

I don't have time to work on a PR for that now, but commenting out these to force using isomorphic git allowed me to do the local setup ;)
Screenshot 2023-01-29 at 10 20 44

@r-menezes
Copy link

I had the following error:

git obsidian error: /usr/bin/gh auth git-credential get: line 1: /usr/bin/gh: No such file or directory
fatal: could not read Username for 'https://github.com': No such device or address

using the suggestion by @sawasawasawa worked and I was able to commit, pull and push.

@mikes-bowden
Copy link

Lort, this was a 3-hour endeavor to find this. Why in the world is this not set by default?

Also, for anyone confused, the file @sawasawasawa mentioned, which did fix my issue, is located inside the /YOURVAULT/.obsidian/plugins/obsidian-git/main.js

Search for:

this.gitManager = new SimpleGit(this);

@Vinzent03
Copy link
Collaborator

@sawasawasawa I understand using isomorphic-git makes authentication a lot easier, BUT it's way slower and doesn't support all featuers, because it's a complete reimplementation of Git in javascript. For example is the merge conflict solver not as good as native git.

I tried to come up with the most general solution as possible, without having to install too much packages or write many config. I summarized it here. May you try it out and tell me how it's working? I can't test it on all operating systems. Especially not macOS.

@sawasawasawa
Copy link

@Vinzent03 Can't promise, but I will try to arrange some time for that on the weekend ;) Just to clarify - you want me to test the macOs part here https://github.com/denolehov/obsidian-git/wiki/Authentication#macos ?

Is your testing procedure described somewhere? I'd rather not mess too much with my main vault ;)

@Vinzent03
Copy link
Collaborator

@sawasawasawa I doesn't change anything in your vault. It changes a global git config, which doesn't affect your vault in any way currently, because you use isomorphic-git.

@sawasawasawa
Copy link

@Vinzent03 Ok I think I understand better now what was causing the confusion.

2 weeks ago I initiated the vault on my mobile, connected it to the repo and afterwards created a new vault on desktop, and imported the vault using the plugin. After doing so when I reloaded obsidian some config from the mobile must have been used and it was missing the some data.

I did it the other way round today:

  1. Initiated a new repo on github
  2. Wired it up with using obsidian git (and here I can confirm that macOs keychain authentication indeed is working as expected)
  3. created a new vault on mobile
  4. added obsidian git on mobile, configured using a PAT
  5. cloned the vault to mobile - then I have to restart the application, and the PAT config disappears.

I am not sure if @mpfp @albinotonnina @kevinnmark @FnigePython @r-menezes @mikes-bowden were facing the same issue. Anyways it seems like the authentication procedure and iOs/OSX combination setup could be better described (and probably mentioned somehow in the settings). Having said that, and having solved my issues the hacky way - I am not sure how it should look like :P

@Vinzent03
Copy link
Collaborator

@sawasawasawa

some config from the mobile must have been used and it was missing the some data.

Please be more specific, what exactly was the issue?

then I have to restart the application, and the PAT config disappears.

Do you mean that the password field was empty? That's by design, it's still stored, but not shown.

I don't think it was necessary to create a new GitHub repository and vault, but great it's working now.

@lowercasename
Copy link

I'm experiencing this too. New vault created today, never used the plugin before.

@Vinzent03
Copy link
Collaborator

Please follow the documentation

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

10 participants