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

Krakenudo
  • 182
  • 1
  • 17
  • 2
    Just add the two different remotes to your repo, you can push to both of them. – jonrsharpe Mar 21 '20 at 20:47
  • 1
    https://stackoverflow.com/search?q=%5Bgit%5D+multiple+remotes – phd Mar 21 '20 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` – William Pursell Mar 22 '20 at 00: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 – Krakenudo Mar 22 '20 at 17:01
  • Then please [edit] to expand on what you tried and what "failed" means. – jonrsharpe Mar 22 '20 at 17:01

0 Answers0