Dumb git problem updating

When I did a git pull last night on macOS, this is what I got:

[cbell@artemis ~/src/repos/tt-rss]$ git pull
remote: Counting objects: 29, done.
remote: Compressing objects: 100% (29/29), done.
remote: Total 29 (delta 20), reused 0 (delta 0)
Unpacking objects: 100% (29/29), done.
From https://tt-rss.org/git/tt-rss
   4178dc85..fdde1155  master     -> origin/master
Updating 4178dc85..fdde1155
Fast-forward
 classes/feeds.php     |  2 +-
 classes/rpc.php       |  5 +++--
 classes/rssutils.php  |  4 ++--
 include/functions.php | 36 ++++++++++++++++++------------------
 4 files changed, 24 insertions(+), 23 deletions(-)
[cbell@artemis ~/src/repos/tt-rss]$

When I did the same on FreeBSD, I got this:

cbell@tt-rss:/home/cbell/tt-rss $ git pull
fatal: unable to update url base from redirection:
  asked for: https://tt-rss.org/git/tt-rss/info/refs?service=git-upload-pack
   redirect: https://git.tt-rss.org/fox/tt-rss/info/refs
cbell@tt-rss:/home/cbell/tt-rss $

The git version on macOS is 2.13.6, on FreeBSD it’s 2.15.1. I’ve been running tt-rss on FreeBSD for about 3 years now without any issues but I can’t figure this one out. Help?

Easy fix is probably to edit the /home/cbell/tt-rss/.git/config file and change the url in there to tt-rss.git - and try again. I think the URL changed recently and for some reason that’s not liking being redirected from old to new.

Thank you! That was exactly the issue! The URL that was in there was this one:

https://tt-rss.org/git/tt-rss

Looking now on the Mac side I see the URL is this:

https://tt-rss.org/git/tt-rss.git

I’m guessing what you provided and what I see in .git/config on macOS are at least pointing to the same location. It looks like the key is the “.git” on the end of the URL.

Thanks again!

that’s likely my fault for screwing up redirects in nginx after last repository URL change (which wasn’t needed anyway).

can you post the broken remote URL so i could attempt to unfuck it? thanks.

e: oh you posted the URL while i was replying, cool. the first one was the broken one? it doesn’t seem to point to the git repository, strange. maybe it’s some old gitlab (or pre-gitlab) syntax.

fox, that’s right. The first URL is the one the broken one.

Here’s the full .git/config that wasn’t working:

[core]
    repositoryformatversion = 0
    filemode = true
    bare = false
    logallrefupdates = true
[remote "origin"]
    url = https://tt-rss.org/git/tt-rss
    fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
    remote = origin
    merge = refs/heads/master

The only difference I can see is the .git at the end of the URL is missing on the broken one. Once I saw that from xtaz’s post (and that URL worked, too), I put the broken one back in place and added .git to the end (matching the macOS .git/config). It seems it’s working fine now.

i think i know why this worked before but i don’t think it was supposed to since the url is technically not correct. well, good enough excuse to not fix anything so i won’t. :slight_smile: