Giter Site home page Giter Site logo

git-auto-sync's Introduction


Mobile first Markdown Notes integrated with Git

Get it on Google Play Download on the App Store

Build Status License: AGPL v3
REUSE status Donate via GitHub

Summary

GitJournal is a note taking app focused on privacy and data portability. It stores all its notes in a standardized Markdown + YAML header format (optional). The notes are stored in a Git Repo of your choice - GitHub / Gitlab / Custom-provider. This means you can easily self host or host your notes in one of the many Git providers.

Community

Screenshots

Migrating from Existing Apps

Contributing

Please feel free to open an issue for any bug or feature request. Additionally, you can vote on existing Issues by reacting with a 'πŸ‘'.

License

All code contributed by Vishesh Handa is licensed under the AGPL. All code contributed by anyone else is licensed under the Apache License 2.0. This is done so that GitJournal can avoid needing a CLA, and it can be distributed it on the Apple App Store which doesn't allow AGPL.

The documentation (including this file) and translations are under a Creative Commons Attribution 4.0 International License.

git-auto-sync's People

Contributors

vhanda avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

git-auto-sync's Issues

daemon: "the service is not installed"

Hi Vishesh,

I just installed git-auto-sync on my Ubuntu 22.04.1 LTS as described in the Installation section for Ubuntu/Debian. Installation worked without issue.

I added a couple of respositories I want to sync using git-auto-sync:

❯ git-auto-sync daemon add /home/me/src/ppp/repo1
Installing git-auto-sync as a daemon
Starting git-auto-sync-daemon
❯ git-auto-sync daemon add /home/me/src/ppp/repo2
Starting git-auto-sync-daemon
❯ git-auto-sync daemon add /home/me/src/ppp/repo3
Starting git-auto-sync-daemon
❯ git-auto-sync daemon add /home/me/src/ppp/repo4
Starting git-auto-sync-daemon
❯ git-auto-sync daemon ls
/home/me/src/ppp/repo1
/home/me/src/ppp/repo2
/home/me/src/ppp/repo3
/home/me/src/ppp/repo4
❯ git-auto-sync daemon status
2022/08/29 12:02:50 the service is not installed

As a result of the daemon not running, the repos are not synchronised.

Is there anything I am doing wrong or is there any prerequisite bevor installing git-auto-sync?

Regards
Peer

"git-auto-sync-daemon is NOT Running!"

macOS Monterey 12.5, M1 Mac

I've set up git-auto-sync and it has successfully synced my repo, then I added the repo to the daemon. When I run git-auto-sync daemon status I receive the following message:

git-auto-sync-daemon is NOT Running!
Monitoring -
   /my/chosen/directory

How do I get the daemon to start?

Background Process for Auto Syncing Git Repos was skipped

Hi Vishesh,
Thanks for putting your efforts into this. I was making use of a bash script and cron until now. I was thinking of moving over to inode watcher tools like entr or something. So I was excited to see that you were focusing on this feature.

However, this doesnt seem to work for me on ArchLinux. The manual mode seemed to create commits but didnt push to the remote. I saw this error.

gpg-agent[2775]: scdaemon[8002]: apdu_open_reader: failed to open driver 'libpcsclite.so.1': libpcsclite.so.1: cannot open shared object file: No such file or directory

I installed the pcsclite package and this seemed to solve the manual mode issue to some extent. When i check the systemd status of the daemon I see this error.

systemd[3395]: Background Process for Auto Syncing Git Repos was skipped because of a failed condition check (ConditionFileIsExecutable=/usr/bin/git-auto-sync-daemon)

The gpg-agent is still not completely silent. I have these errors still lurking.
gpg-agent[8000]: scdaemon[8000]: pcsc_establish_context failed: no service

Can you help me troubleshoot this?

Unusable for Average User

Hi,

Many thanks for designing this script but it seems unusable for an average PC user. I am getting these errors when trying to run the .sh script in the terminal and get git to work. Not to mention the .plist file which I don't even know how to run on my Linux system.

A simple GUI app that would monitor file changes and autosync would be a much needed addition to the GitJournal project, in my view.

user@pc ~/ . . . /GitJournal $ bash git-auto-sync.sh 
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
user@pc ~/ . . . /GitJournal $ git init
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint: 
hint: 	git config --global init.defaultBranch <name>
hint: 
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint: 
hint: 	git branch -m <name>
Initialized empty Git repository in / . . . /GitJournal/.git/

When does the daemon sync?

Windows 10 user here:

After making sure that git-auto-sync sync works. I used the "daemon add" command to add my repository. Using "daemon status" shows:

git-auto-sync-daemon is Running!
Monitoring -
   "FOLDER_PATH"

Looks like everything is working fine, however when checking the actual repo, changes are not being synced at any moment even after waiting a few hours.
From the README.md I though this runs every 10 minutes but it doesn't look like it. When does it call sync exactly?

Consistent command line options

For the sake of consistency I would assume the use of hyphens for command line parameters. Egs.: --sync and -s for the synchronization command over sync and s. Similar to --help and -h.

Sync started failing on macOS Monterey

I set up auto-sync a few months ago (for some shared Org mode files) and it seemed to be running well since then. However, late last month it seems to have silently stopped working, perhaps due to some sort of software update. git auto-sync daemon add . and all other daemon commands seem to work fine, indicating that the repo is registered to synchronize and the daemon is running, but it doesn't actually make commits or push them. git auto-sync sync . fails with the cryptic error 2022/11/17 16:07:08 invalid checksum. I vaguely remember having some minor difficulties recently getting gpg and git to work correctly again after some changes, but AFAIK that's all working fine now (and manually committing and pushing from the synchronized directory has no problems).

Where would I find more troubleshooting information?

Deamon registration fails on Windows 11

I ran git-auto-sync d add <repo> and I am getting:

Installing git-auto-sync as a daemon
Starting git-auto-sync-daemon
2022/05/15 13:54:16 The dependency service does not exist or has been marked for deletion.

I checked for the process called git-auto-sync-daemon, but there is none.

I am using git-auto-sync on Windows 11 and manual synchronization works.

Doesn't sync if on previously repo was unaccessible

Steps to reproduce:

  • disconnect from VPN (I guess simple internet disconnect would do too)
  • change any file
  • call git-auto-sync sync
    • it should give an error accessing remote repository
  • connect VPN
  • try git-auto-sync sync

Expect: retry: git add; git commit; git pull; git push
Observed: nothing to commit -> stops even though local is 1 commit ahead of remote

➜  git-auto-sync --version
git-auto-sync version 1.5

➜  git-auto-sync sync
2024/04/30 16:23:23 exit status 128: Command: git fetch origin
StdOut:
StdErr: ssh: Could not resolve hostname gerrit.int.COMPANY.com: nodename nor servname provided, or not known
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
➜  git-auto-sync sync
2024/04/30 16:23:51 exit status 1: Command: git commit -m  D rust/ripgrep-all
 D rust/rustlings
 D tools/clink/clink-completions
StdOut: On branch master
Your branch is ahead of 'origin/master' by 1 commit.
  (use "git push" to publish your local commits)

nothing to commit, working tree clean

StdErr:
➜ 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.