logseq-plugin-git icon indicating copy to clipboard operation
logseq-plugin-git copied to clipboard

Git push issue and git pull feature additon request

Open ARAWKMK opened this issue 2 years ago • 16 comments

Hi, I am trying to use your plugin for github and it's able to commit but unable to push it to my github repo. I have used the git bash to already working stage of commiting and push to github but on directlty using your plugins button to commit and push it show this on console but doesn't pushed it

image

Also it would be a good idea to get the github url or similar from the user in the plugin settings of logseq and store it to for git hub or similar for each different logseq graph.

Also a git pull option would be a relief such that user need not use the git bash or something when / if accessed from different device and pushed the changes from there. Directly from the buttons the user can pull and update local graph. Thanks for the plugin by the way.

ARAWKMK avatar May 17 '22 11:05 ARAWKMK

From the log, after submitting, there are indeed no modified files locally. You can test whether the push is successful using the git command from logseq.

The plugin uses the git tool that comes with logseq, which will automatically identify different graphs.

As for the pull command, I think it does need to be added, I will add it to the development plan.

haydenull avatar May 21 '22 03:05 haydenull

Version 1.1.0 added a pull button.

haydenull avatar May 22 '22 09:05 haydenull

It would be better if instead of using a generic message like

image

it ask the user to enter a message for committing. Or may be an option to prefix or suffix only date-time along with the user entered message.

ARAWKMK avatar May 25 '22 08:05 ARAWKMK

While using the git push button of the plugin it showing me this message image

I am able to successfully commit the changes. I don't know why am I not able to push it. Also after 1st attempt to any new commit 'git status' button is showing no changes detected. I think there is some bug as well that if it's unable to push still it's showing no changes. Also if I try git bash and use command 'git push origin master' and type in the password for 'Enter passphrase for key' I am successfully able to push the commits.

Also not able to pull any changes made in GitHub files directly. But using git bash command 'git pull' and type in the password for 'Enter passphrase for key', it ask to write a comment in a file editor and then I am successfully able to pull the commits.

Can someone please help in what am i doing wrong? Windows 10, Logseq v0.7.0, logseq-git-plugin v1.1.0

ARAWKMK avatar May 25 '22 08:05 ARAWKMK

I'm not able to understand exact;y what you mean by

test whether the push is successful using the git command from logseq.

and by

The plugin uses the git tool that comes with logseq

I am fairly new to theses things. Can anyone please help me to understand?!

ARAWKMK avatar May 25 '22 08:05 ARAWKMK

It would be better if instead of using a generic message like

image

it ask the user to enter a message for committing. Or may be an option to prefix (前缀) or suffix (后缀) only date-time along with the user entered message.

The purpose of the plug-in is to synchronize quickly. If you need to enter information each time, it will affect the efficiency. Maybe I can add a plug-in configuration to set up the commit message template.

haydenull avatar May 26 '22 00:05 haydenull

While using the git push button of the plugin it showing me this message image

I am able to successfully commit the changes. I don't know why am I not able to push it. Also after 1st attempt to any new commit 'git status' button is showing no changes detected. I think there is some bug as well that if it's unable to push still it's showing no changes. Also if I try git bash (巴什) and use command 'git push origin master' and type in the password (密码) for 'Enter passphrase for key' I am successfully able to push the commits.

Also not able to pull any changes made in GitHub files directly. But using git bash (巴什) command 'git pull' and type in the password (密码) for 'Enter passphrase for key', it ask to write a comment in a file editor and then I am successfully able to pull the commits.

Can someone please help in what am i doing wrong? Windows 10, Logseq v0.7.0, logseq-git-plugin v1.1.0

The plugin does not currently support entering passwords, you can refer to this document https://docs.github.com/en/authentication/connecting-to-github-with-ssh

haydenull avatar May 26 '22 00:05 haydenull

I'm not able to understand exact;y what you mean by

test whether the push is successful using the git command from logseq.

and by

The plugin uses the git tool that comes with logseq

I am fairly new to theses things. Can anyone please help me to understand?!

Search git in commands palette.

image

haydenull avatar May 26 '22 00:05 haydenull

I tried to check my connection in logseq image

Is it because of this that I'm not able to push using logseq?!

ARAWKMK avatar May 27 '22 05:05 ARAWKMK

This is probably because ssh is not part of the git command.

haydenull avatar May 27 '22 08:05 haydenull

You can add the ssh key with git bash and then use the plugin to push.

haydenull avatar May 27 '22 08:05 haydenull

I tried 'git commit -a -m "adding line"' command it worked but "git push origin master" command gives this error. Some help please.

image

Already added the ssh key with git bash and I am able to commit and push to github using git bash. I am to to commit the chnages but still not able to use above 'run git command' in loseq for pushing commits to github. I have updated these things in logseq discord server in help page. Will be much nicer if we continue there.

ARAWKMK avatar May 27 '22 09:05 ARAWKMK

It recalls my that I once have this same issue, and fixed it by adding below line to my .bashrc on linux, not in logseq though.

eval "$(ssh-agent -s)"

reference

But I not sure how to add these line in logseq though. Maybe you have to ask the logseq team.

CharlesChiuGit avatar May 27 '22 10:05 CharlesChiuGit

How to check if Logseq-plugin-git recognize my key agent or not? I am using Putty keyagent on Windows 10 at the moment.

Seems to relate to desktop/dugite/issues/208

qiansen1386 avatar Aug 09 '22 09:08 qiansen1386

Search git in commands palette.

Then run a git pull or push operation to see if it succeeds.

haydenull avatar Aug 09 '22 11:08 haydenull

push error: [email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
push error: warning: unable to access '.git/config': Permission denied
fatal: unknown error occurred while reading the configuration files

qiansen1386 avatar Aug 12 '22 17:08 qiansen1386