Can't push to server

I’ve created a project on my (new-ish) gitea server (docker) through the web interface. It then said I should:

touch README.md
git init

git add README.md
git commit -m “first commit”
git remote add origin http://localhost:3000/alien/foo.git
git push -u origin master

So I did all that, but at the last step I get:

fatal: unable to access ‘http://myserver.local:3000/alien/foo.git/’: Failed to connect to myserver.local port 3000: Connection refused

What’s going on please?

I note there’s a difference between “localhost” and “myserver.local” but I don’t know why gitea told me to use localhost in the first place, or whether that’s related to the problem I’m having.

Hi,
To me this sounds like you might have a mismatch in your gitea configuration (app.ini).
You may want to double check your server section.
Specifically, the domain and root_url fields.

Something you should also be aware of when using docker is whether the ports your container is using are actually reachable for your clients.
Seeing as you’ve been able to access your web interface, I assume this is set up correctly.

For the git repository you made, you can run git remote -v to check your current remotes.
Make sure the URL for origin points to the right place (where your gitea is hosted); if it isn’t, you can change it through git remote set-url origin <URL>.

For the git repository you made, you can run git remote -v to check your current remotes.

I’d already done all of that. Everything matched.

I uninstalled gitea and use plain old git now, because it Just Works.