Can't reach gogs server from git clone, but I can reach it from chrome browser

When I try to clone a repository with my domain name, it fails. But,
it works when I use the IP address directly.

Here is the issue:

(this works fine)

/tmp » git clone http://:3000/pratap/myna.git
Cloning into ‘myna’…
Username for ‘http://:3000’: pratap
Password for ‘http://pratap@:3000’:
remote: Enumerating objects: 9, done.
remote: Counting objects: 100% (9/9), done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 9 (delta 1), reused 0 (delta 0)
Unpacking objects: 100% (9/9), done.

(this fails)

tmp » git clone http://gogs.example.org/pratap/myna.git
Cloning into ‘myna’…
fatal: http://gogs.example.org/pratap/myna.git/info/refs not valid: is
this a git repository?

Now, I can access the gogs site from a browser, successfully both
ways. That is, from within my chrome browser, I can browse to
1) http://:3000/, and also
2) http://gogs.example.org
and it works fine (I reach the gogs sign-on page)

I have set up the sub-domain name gogs.example.org to point to
<IP-addr-of-home-router:3000 by adding two records, one is a “URL
redirect record” and the other is a “SRV record” to my domain hoster’s
advanced DNS settings. I have also forwarded port 3000 to my home
raspberry pi where gogs is runnning.

What am I doing wrong?

Why can I access gogs.example.org via Chrome browser, but not via git
clone from the command line?

My gogs version is:

[email protected]:~ $ /home/git/gogs/gogs -v
Gogs version 0.11.97.1116

Thanks,

Pratap

Strange, the earlier posting is missing some text. Could be a cut/paste error. Here it is again:

When I try to clone a repository with my domain name, it fails. But,
it works when I use the IP address directly.

Here is the issue:

(this works fine)

/tmp » git clone http://IP-addr-of-home-router:3000/pratap/myna.git
Cloning into ‘myna’…
Username for ‘http://IP-addr-of-home-router:3000’: pratap
Password for ‘http://[email protected]:3000’:
remote: Enumerating objects: 9, done.
remote: Counting objects: 100% (9/9), done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 9 (delta 1), reused 0 (delta 0)
Unpacking objects: 100% (9/9), done.

(this fails)

tmp » git clone http://gogs.example.org/pratap/myna.git
Cloning into ‘myna’…
fatal: http://gogs.example.org/pratap/myna.git/info/refs not valid: is
this a git repository?

Now, I can access the gogs site from a browser, successfully both
ways. That is, from within my chrome browser, I can browse to
1) http://IP-addr-of-home-router:3000/, and also
2) http://gogs.example.org
and it works fine (I reach the gogs sign-on page)

I have set up the sub-domain name gogs.example.org to point to
IP-addr-of-home-router:3000 by adding two records, one is a “URL
redirect record” and the other is a “SRV record” to my domain hoster’s
advanced DNS settings. I have also forwarded port 3000 to my home
raspberry pi where gogs is runnning.

What am I doing wrong?

Why can I access gogs.example.org via Chrome browser, but not via git
clone from the command line?

My gogs version is:

[email protected]:~ $ /home/git/gogs/gogs -v
Gogs version 0.11.97.1116

Hi, based on the information you provided, I suspect when you git clone via domain name “gogs.exmaple.org”, the request isn’t routed to your Raspberry Pi.

Can you post the output of this command?

$ curl -v http://gogs.example.org/pratap/myna.git/info/refs