Iphone Obsidian Git Pull Broken, nothing has changed between today and yesterday

What I’m trying to do

Have been using obsidian git to sync on my windows laptop and my iphone. Usually no issues, I clone the repo to my phone using alpine (or the ish client), I specify the repo with my username, provide a PAT from Github and everything works fine (barring merge issues on the phone which seem pretty much unsolvable).

Things I have tried

Today, it just stopped working. Push does nothing, pull works just fine.

Checked the PAT on github and it still works and is valid. Everything works fine on my laptop and PC. Regenerated a new token just to check, and the phone still won’t push. Not sure what could be causing this but want to avoid recloning the repo altogether as it’s a bit of a hassle. If anyone could help me troubleshoot this I would be eternally grateful.

If that is the case, you’ll have to clone again.
Copy your md files (your vault) with the whatever fresh changes you might have made on iOS to another local folder. Delete repo. Clone. Delete everything except for .git folder. Move your files that you copied out just now back to the repo.

  • I like to delete because I don’t like pop-up messages that say if I want to replace this and that file.

The merge isn’t the problem. That is separate and I have my own ways of dealing with it. Pulling doesn’t work at all on the phone, even when given new credentials. I don’t know how to fix this.

Okay. So you already knew about the workaround method.

What is the error message?
How big is the vault?

There is no error message, it seems that it just times out (nothing happens in obsidian), and in ish (or Alpine), one I click enter with my password nothing happens. (I think this is it timing out, as I can still type but nothing ever executes and I don’t get an error).

On mobile timeout is an issue. That’s why I opted for git with A-Shell.

Now I have JB, I no longer use A-Shell, either.

OK so you think using ish just won’t work in the future (maybe the vault just got too large and now push requests just time out?). Or what is the technical reason why it has stopped working?

The technical reason at Obsidian Git is mentioned at the plugin description.
I never used iSH, so not sure about timeout issues there.
Also, you can try adding some lines to your config that may help with RAM management:

[core]
	repositoryformatversion = 0
	filemode = true
	bare = false
	logallrefupdates = true
[core]
    packedGitLimit = 128m
    packedGitWindowSize = 128m
[pack]
    deltaCacheSize = 128m
    packSizeLimit = 128m
    windowMemory = 128m
[submodule]
	active = .
[remote "origin"]
	url = https://github.com/<username>/<reponame>.git
	fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
	remote = origin
	merge = refs/heads/master
[lfs]
	repositoryformatversion = 0
  • I use master instead of main. You don’t need to worry about that. Just add the lines with core and pack.
    Not sure how much it helps. You need to add these (to at least the config file on your mobile device or maybe even to PC side) after initializing your git, I believe.

I have JB now and calling git status is extremely fast (less than 1 sec). Before on A-Shell it was 30-45 secs.

But, mind you, A-Shell doesn’t have git, only libgit2. On JB, I can use git. So not sure the RAM management would work with libgit2 – must check online docs.

Ended up fixing my issue by just cloning again. Somehow push works again. Don’t think it’s a timeout issue with the specs of the phone because pull and clone work just fine. Your solutions seem interesting but probably apply more to a-shell than ish. Would love to know why push breaks randomly on ish then gets fixed after recloning.

Still facing this issue. Cloning fixes it temporarily. If anyone has any insight let me know.

I can be anyone…

Try this:

Tried that and still get stuck here:

it seems that it gets stuck at the push and times our. Somehow cloning makes this not happen. Let me know if you understand why gino, didn’t mean to not include you.

Confident git authentication is working because it works after clone and on other devices. Pull and commit working but pushing being broken doesn’t make much sense to me. Not an internet issue either as it works after a fresh clone on same network.

You can clone and even pull from the remote but you won’t be allowed to push unless your authentification is done – at least on the SSH protocol* (you need private and public keys registered). Cause as I said I almost always used SSH, and while on iPadOS, I was unsuccessful caching in my credentials for HTTPS (in A-Shell; as I was not experienced at this at the time).
BUT: Obsidian Git should do this of itself. And as I said, it does use HTTPS. At least it was before. Not sure anything has changed.

I also recommend reaching out at the Issues page of the plugin and searching for a similar problem first.

* EDIT: Nor will you be allowed on HTTPS, either. If the repo is private, you need to use login and password/token.

Maybe I am not being clear, once I have cloned my phone is then able to push as normal for a bit. So I could not see it being an authentication issue, clearly authentication works briefly, as briefly I can clone, pull and push after I have cloned.

Will post on the issues page, didn’t find any similar issues.

Any other ideas? @gino_m

Installed Obsidian Git on a smaller vault to see how it goes. Nothing of the sort you are reporting happened here yet.

Let me know if you experience an issue with a larger vault.

Not going there, I’m afraid.
With the main vault, I use the methods detailed above.

Well I suppose this issue will remain. I’ve posted an issue to the github. If anyone else has any insight please let me know.

i’ve never been able to get obsidian git to work on iphone.

working copy is 100% worth it. coming from someone who was extremely reluctant to purchase at first.

1 Like