-
-
Notifications
You must be signed in to change notification settings - Fork 307
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]: error: no such remote 'main' #599
Comments
Ah, the docs seem to assume a certain familiarity with git. When we refer to "main" or "master", that's the git branch name, not the remote. When Obsidian Git is asking to create a new remote, it's asking for the remote URL (in this case, the GitHub repo URL) you're going to be syncing your notes to. To find the remote URL, navigate back to page with the GitHub repo you created. You'll want to click on the I would also make sure that you set up your git credentials. You need to be able to authenticate to GitHub before you can sync your notes using git. GitHub has a decent set of steps for how to do this here. |
I think there's something else going on here - I've been using Obsidian Git for months, and all of a sudden, I'm getting a similar error. Whenever my vault tries to push a change, I get an error that says "No upstream branch is set." I only have one branch, but when I type "main" into the dialog, I get the same error: No such remote "main." There doesn't seem to be an issue with my authentication - I can push changes from Git Bash on my machine, but I can't tell why it's not working through Obsidian. I tried to check in the plugin settings (the "Getting Started" page of the documentation says there should be an "Authentication/Commit Author" section that doesn't seem to exist anymore) but there's nothing there that would give me any clue what's going on. |
May you please share your |
Hi,
Sure, see attached.
…On Thu, Oct 12, 2023 at 8:09 AM Vinzent ***@***.***> wrote:
May you please share your .git/config file?
—
Reply to this email directly, view it on GitHub
<#599 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACPRJG65FI65VVX3XDJYSEDX67TY5ANCNFSM6AAAAAA4RWJDUE>
.
You are receiving this because you commented.Message ID:
***@***.***>
--
Siobhain
_______________________________
Siobhain Rivera (she/her)
MLS, Digital Libraries
***@***.***
|
This doesn't work with GitHub. There's nothing attached. |
Sorry, the email indicated I could just reply. -_-;; See attached. |
I'm also encountering this, I had to add both the remote and the upstream branch manually with git |
@siothelibrarian You might try the commands from ifacodess for now. Your shared config seems to be the global one and not the in your git repository under |
@ifacodes where do you type these commands? |
using a terminal of some kind! for example, I am on macos, so I would use terminal, (or to be more precise I use iterm2), althought if you are on windows you should probably use powershell.
once you are certain git is installed, you also need to verfiy you have initialized git in your vault. as an example, for me on macos this is in create a new, empty github repo, name it whatever you want, and copy the https or ssh url, depending on which one you have setup to use. to set that repo as the remote for your vault, enter finally push your vault to the upstream repo with I tried to be thorough in case anyone came across this issue and is new with git or source control. let me know if you have anymore questions. |
Please check repo main branch name , for me plugin stopped working with main branch name "main" |
I'm new to Obsidian. I tried this but it's not working as well. I have master branch on remote and commits. Can you provide us how to debug this? Nvm.. I think I can use CLI instead of using the plugin. |
Did you follow what I posted above? #599 (comment) is not truly a valid fix to this issue, that sounds like it is dependant and the git version installed on your system, as most up to date git versions no longer support 'master' as the default branch. |
I just ran into the same problem. I had to add the remote via cli: |
Do we need to have our vault on github? Does the plugin not work without a github specification? |
So I was able to resolve the issue for myself.
NOTE: you don't need to have your vault on github or have a remote origin if you don't want to and can still use git locally for version tracking. |
Instead you should change the settings to disable any automatic pull or push. |
Describe the bug
I created a new vault and new GitHub repo.
error: No such remote 'main'
"How do I create a new remote?
Relevant errors (if available) from notifications or console (
CTRL+SHIFT+I
)git obsidian error: error: No such remote 'main'
Steps to reproduce
Obsidian Git: Initialize a new repo
Obsidian Git: Push
main
into the text boxExpected Behavior
Create a new remote named 'main'
Addition context
I have also tried the names:
remote
andmaster
This isn't really a "bug report" but there aren't any other issue templates
Operating system
Windows
Installation Method
None
Plugin version
2.22.0
The text was updated successfully, but these errors were encountered: