# Can't push to server

**URL:** <https://forum.gitea.com/t/cant-push-to-server/2882>\
**Category:** Install/Maintain/Configure\
**Created:** [January 15, 2021, 11:24pm UTC](https://forum.gitea.com/t/cant-push-to-server/2882 "2021-01-15T23:24:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kvdafnkcads](https://avatars.discourse-cdn.com/v4/letter/k/7cd45c/32.png) [@kvdafnkcads](https://forum.gitea.com/u/kvdafnkcads)\
**Post date:** [January 15, 2021, 11:24pm UTC](https://forum.gitea.com/t/cant-push-to-server/2882/1 "2021-01-15T23:24:03Z")

</div>

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](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/](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.

---

<div class="post-metadata">

**Author:** ![TJvV](https://avatars.discourse-cdn.com/v4/letter/t/858c86/32.png) [@TJvV](https://forum.gitea.com/u/TJvV)\
**Post date:** [January 18, 2021, 8:14am UTC](https://forum.gitea.com/t/cant-push-to-server/2882/2 "2021-01-18T08:14:00Z")

</div>

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](https://docs.gitea.io/en-us/config-cheat-sheet/#server-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>`.

---

<div class="post-metadata">

**Author:** ![kvdafnkcads](https://avatars.discourse-cdn.com/v4/letter/k/7cd45c/32.png) [@kvdafnkcads](https://forum.gitea.com/u/kvdafnkcads)\
**Post date:** [January 25, 2021, 9:15am UTC](https://forum.gitea.com/t/cant-push-to-server/2882/3 "2021-01-25T09:15:26Z")

</div>

> 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.
