1

I'm trying to share code between two gits, not between two repositories inside a single git, but two different git servers.

I have a github account, and I have my own git server, thanks to Raspberry and Gitea. I want to share code between this two git servers, one on github and one in localhost.

I want to share pushes between both git, and I've tried to follow this tutorial

https://jigarius.com/blog/multiple-git-remote-repositories

But, when I try to push to localhost, I have:

fatal: repository 'http://localhost:port/user/repo.git' not found 

when I've tried to create the same repo from Web Interface on localhost, I found problems: "Repository already exists"

I think I've tried to run before walk...

5
  • 2
    Just add the two different remotes to your repo, you can push to both of them. Commented Mar 21, 2020 at 20:47
  • 1
    stackoverflow.com/search?q=%5Bgit%5D+multiple+remotes Commented Mar 21, 2020 at 21:14
  • What do you mean by "a git"? To share code between two git repositories, you need to fetch, or make a bundle. If the repos are on the same host, you can use local methods as a transport mechanism. If the repos are on different hosts, you need to use some some non-local transport (eg, http, or sneaker net). But it sounds like you just want git fetch and git push Commented Mar 22, 2020 at 0:06
  • I have a github repository and a gitea repository on localhost. I would like to push to both servers at one time. I think I found yesterday how I can add two different remotes as @jonrsharpe said previously, but I failed Commented Mar 22, 2020 at 17:01
  • Then please edit to expand on what you tried and what "failed" means. Commented Mar 22, 2020 at 17:01

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.