# Issue with commit a2b26ff "fsck: convert gitmodules url to URL passed to curl"

2 messages from 2020-05-11 to 2020-05-11. Participants: Arno Gourdol, Jeff King.
Thread: https://gitlist.dev/t/53447

## Arno Gourdol, 2020-05-11 18:02

Subject: Issue with commit a2b26ff "fsck: convert gitmodules url to URL passed to curl"
Message-ID: <8F92F354-BBDD-4629-98D4-A67E0A865397@gmail.com>
URL: https://gitlist.dev/e/8F92F354-BBDD-4629-98D4-A67E0A865397%40gmail.com

```
Hi,

I have run into an issue that is preventing me from pushing commits to my GitHub repo. I believe the problem can be tracked down to this change:

https://github.com/git/git/commit/a2b26ffb1a81aa23dd14453f4db05d8fe24ee7cc

This change introduced stricter validation and checking of the .gitmodules file.

The problem is that I had an invalid URL in my .gitmodules file (an extra "/" in "http://“):

ˋˋˋ
[submodule "packages/website/assets/tecendil-js"]
    path = packages/website/assets/tecendil-js
    url = https:///github.com/arnog/tecendil-js.git
    branch = master
ˋˋˋ

However, I cannot commit a fix to this, as it gets rejected because the current .gitmodules is invalid. As a result I can no longer push commits to my repo.

Any suggestion on how to work around this?

(PS: I have attempted to contact GitHub about this, but haven’t heard back)

Best,
Arno.



```

## Jeff King, 2020-05-11 19:49

Subject: Re: Issue with commit a2b26ff "fsck: convert gitmodules url to URL passed to curl"
Message-ID: <20200511194930.GA10545@coredump.intra.peff.net>
URL: https://gitlist.dev/e/20200511194930.GA10545%40coredump.intra.peff.net
In-Reply-To: <8F92F354-BBDD-4629-98D4-A67E0A865397@gmail.com>

```
On Mon, May 11, 2020 at 11:02:24AM -0700, Arno Gourdol wrote:

> This change introduced stricter validation and checking of the .gitmodules file.
> 
> The problem is that I had an invalid URL in my .gitmodules file (an extra "/" in "http://“):
> 
> ˋˋˋ
> [submodule "packages/website/assets/tecendil-js"]
>     path = packages/website/assets/tecendil-js
>     url = https:///github.com/arnog/tecendil-js.git
>     branch = master
> ˋˋˋ

Yeah, I agree that would be blocked by the recent fsck changes you
found.

> However, I cannot commit a fix to this, as it gets rejected because
> the current .gitmodules is invalid. As a result I can no longer push
> commits to my repo.

Was the broken .gitmodules already pushed up? If so, then the push
fixing it shouldn't need to send the bad object, and should be allowed.
Though you need to make sure you aren't pushing up any intermediate
trees with the broken state, either (i.e., you can't push up the fix on
top of some other changes; the fix has to come first).

If it wasn't already pushed up, then you should be able to fix via "git
rebase -i" or similar. That will rewrite history, but the history hasn't
been shared with anyone else by pushing, it shouldn't be a big deal.

> (PS: I have attempted to contact GitHub about this, but haven’t heard back)

Hopefully one of the suggestions above should lead to a resolution. But
in the worst case they can relax the fsck restrictions temporarily to
get a fix pushed up.

-Peff

```
