Search code examples
gitgit-pushmirrorbitbucket-server

Stash on internal network, internal ip address. How to push from server to internal ip (mirror server .git on internal network)


Hello I was reading this:

https://confluence.atlassian.com/display/STASH/Importing+code+from+an+existing+project#Importingcodefromanexistingproject-ImportanexistingGitprojectintoStash

The part where it says mirror existing git repository.

This is the situation, I'm trying to mirror the repository on a server, into a local directory on my computer, that is on an internal network.

If I do this to the repository on the server:

git remote add stash http://[email protected]:7999/yourproject/repo.git

i dont think it would work because the live server knows nothing about the private ip on the local network.

how would i be able to do this?


Solution

  • when I tried to push using the ip address on the host machine, it would fail, but if i used http://username@localhost:port/path/to/.git it worked. so I guess on a host machine you have to use localhost? you can't use the actual ip address.