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

Git push issue and git pull feature additon request #2

Open
ARAWKMK opened this issue May 17, 2022 · 16 comments
Open

Git push issue and git pull feature additon request #2

ARAWKMK opened this issue May 17, 2022 · 16 comments

Comments

@ARAWKMK
Copy link

ARAWKMK commented May 17, 2022

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.

@haydenull
Copy link
Owner

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
Copy link
Owner

Version 1.1.0 added a pull button.

@ARAWKMK
Copy link
Author

ARAWKMK commented May 25, 2022

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
Copy link
Author

ARAWKMK commented May 25, 2022

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
Copy link
Author

ARAWKMK commented May 25, 2022

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?!

@haydenull
Copy link
Owner

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
Copy link
Owner

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
Copy link
Owner

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

@ARAWKMK
Copy link
Author

ARAWKMK commented May 27, 2022

I tried to check my connection in logseq
image

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

@haydenull
Copy link
Owner

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

@haydenull
Copy link
Owner

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

@ARAWKMK
Copy link
Author

ARAWKMK commented May 27, 2022

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.

@CharlesChiuGit
Copy link

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.

@qiansen1386
Copy link

qiansen1386 commented Aug 9, 2022

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

@haydenull
Copy link
Owner

Search git in commands palette.

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

@qiansen1386
Copy link

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

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

4 participants