Open dodo-the-dev opened 1 year ago
me to
same
hi guys, I found a way to solve this issue. You need to generate a github token and change your upstream settings. Follow the link on how to do this: https://stackoverflow.com/a/68779977/8550989
I didn't wanted the token in the remote url and after many fails I got it to work with this:
/Applications/Logseq.app/Contents/Resources/app/node_modules/dugite/git/libexec/git-core
sudo ln -s /usr/local/git/bin/git-credential-osxkeychain ./git-credential-osxkeychain
This links the "normal" osxkeychain binary to the dugite/git/libexec folder which seems to have most of the git binaries linked? and with that it works
I don't have any idea if this could be added to the dugite node package itself - or if logseq has to add it or even if its possible to do in this plugin - don't have enough logseq experience yet xD
If you were using HTTPS for your git config url, change it to SSH link. that resolves this issue for me. I'm on MacOS.
I'm on Linux using git-credential-libsecret
and due to the way my Gitea is setup, I cannot use SSH but rather rely on HTTPS. Is there a way I can fix the issue anyway?
The information above was helpful but had to do some trial and error to finally get it right. Here are the steps that got it working.
git remote -v
git remote set-url origin https://[token]@github.com/[username]/[repo_name].git
The information above was helpful but had to do some trial and error to finally get it right. Here are the steps that got it working.
Change the remote URL to use SSH token. How to change git remote URL:
- Go here to generate a token: https://github.com/settings/tokens
- Add repo scopes and generate the token, save the token in a secure place.
- Open terminal in the Logseq graph folder
- View current remotes:
git remote -v
- Change remote URL:
git remote set-url origin https://[token]@github.com/[username]/[repo_name].git
Thanks a lot 🙏🏾. This saved me a whole lot of headache.
I'm on Linux using
git-credential-libsecret
and due to the way my Gitea is setup, I cannot use SSH but rather rely on HTTPS. Is there a way I can fix the issue anyway?
I am in the same situation as you. Did you find a solution?
Some research I did into this issue based off of @negue's suggestion (I am a self-hosted gitea user with an https URL):
The git
at /Applications/Logseq.app/Contents/Resources/app/node_modules/dugite/git/libexec/git-core/git
can't push:
$ /Applications/Logseq.app/Contents/Resources/app/node_modules/dugite/git/libexec/git-core/git push
git: 'remote-https' is not a git command. See 'git --help'.
With some searching, that seems to mean that the git
was not compiled with libcurl support.
After replacing this with my system's git
, still no luck. I'm able to push:
$ which git
/opt/homebrew/bin/git
$ rm /Applications/Logseq.app/Contents/Resources/app/node_modules/dugite/git/libexec/git-core/git
$ sudo ln -s /opt/homebrew/bin/git /Applications/Logseq.app/Contents/Resources/app/node_modules/dugite/git/libexec/git-core/git
$ /Applications/Logseq.app/Contents/Resources/app/node_modules/dugite/git/libexec/git-core/git push
Enumerating objects...
but the plugin can't. Bummer! I'm not sure if there is a way to proceed here without manually pushing. Committing with the plugin works great.
Thank you for the guide! I slightly changed it to use it with an SSH URL:
...
- Open terminal in the Logseq graph folder
- View current remotes:
git remote -v
- Change remote URL:
git remote set-url origin git@github.com:[username]/[reponame].git
I seem to be able to pull from the repo my logseq file is in no problems, but it won't let me push to it coming up with the following error:
I've looked everywhere I can, but I can't find where to update the credentials (if there is such a place). I apologise if I'm being dumb.