-
-
Notifications
You must be signed in to change notification settings - Fork 293
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]: Setting up Obsidian Git on a new machine, trouble with "Please make sure you have the correct access rights and the repository exists." #346
Comments
I'm facing the same issue. I copied over the vault (including the Git directory) onto the new machine and set up a new SSH on it. Since then, I have been able to manually push to the remote repo using the command line but always see this error when trying to push through the plugin. |
@architchandra Do you have to enter a passphrase on the command line for the ssh key? |
Hi @Vinzent03 I'm not sure what clicked but I'm no longer facing this issue. I'm using a Mac and the SSH key that I created was not getting loaded into the SSH agent automatically upon login, even after adding details to a config file. So, I added a command to load the key into the agent into my .zshenv file using Since then I have been able to work seamlessly despite my SSH key having a passphrase. And to answer your original question, I had to enter the passphrase the first time I added my key into the SSH agent but not after that. |
Dude I'm like 2 full days with this exact problem and you may have just solved it for me. Now I'm gonna go see if I can break it again, but it's fixed for now! Many thanks!! |
Okay, I DID break it (I ran --apple-load-keychain from the terminal instead of adding it to the bash profile so it broke on login as expected) But I think I figured out where it was broken in the first place. I followed the GitHub guide for setting up the SSH keys and part of that included adding it to the keychain in the config file. They suggested:
I didn't have any clue if it would work, but I figured that if the problem was with obsidian-git not being able to pull from the keychain, maybe I needed to change the host. At first, I changed host to * which did work, but I wasn't sure why I couldn't include GitHub. So I made the host just *github.com (removing the . dot after the *) and now it seems to be working in Obsidian even without loading the keychain through the bash profile/zshenv (which also did work) It was literally one dot. I'm not okay 😮💨 Since probably a lot of us noobs are using the GitHub guide for setup, I'd guess a lot of the publickey errors are coming from that one dot. Now I'm going to go sleep for two days straight and then work on fixing the iPad side of things that I surely broke in the process of getting this one working haha |
im trying to clone my private repo using
@chaosraine where exactly did you find this 4-line config? |
This is the guide I was using, if I'm remembering correctly The file was my .ssh/config file. You can create it using the instructions on that page (on macos). It is blank upon creation, so I pasted in the recommended example code from the github guide. The only real problem I ran into was that it recommended using Host: *.github.com - I changed it to *github.com (without the first dot) and that's what worked! |
@chaosraine - This config is from Github's docs related to creating SSH keys. From what I can remember, the given config mentioned An update to my previous comment: I no longer have to load in the Apple's keychain manually upon login since changing to |
Just wanted to report that the fix from @architchandra also solved this issue for me. I mistakenly had In any case - thank you for posting your fix. (edit: Can confirm that |
Describe the bug
I try this
git push -u origin main
and get the error below. I'm trying to sync a second machine to my repo.I've added a new SSH key to my new machine and github (I think that worked) but can't figure out what to do now.
This isn't technically in the plugin yet, since I haven't been able to get that far. Can you still help me with this?
Relevant errors (if available)
Steps to reproduce
Try pushing to remote. Get error
Expected Behavior
No response
Addition context
No response
Operating system
Linux
Plugin version
2.8.0
The text was updated successfully, but these errors were encountered: