On Wed, Jul 11, 2012 at 6:20 PM, Federico Don <[email protected]>wrote:

> Hi to all,
>
> I have been working with gitorious private, My server have IP private
> inside in my LAN, this is working excellent, but I have a problem.
> When I am working from my LAN use this command:
>
> git init
> git add .
> git commit -m 'first commit'
> git remote add origin [email protected]:Project/REPO.git
> git push origin master
>
> this is good, but i don't know how to do it from outside, from
> internet......
>
> I can't do public to port 22
>
> I have ip public on my firewall
>
> What do you recommend doing??
>
> yo pensaba redireccionar un puerto de mi
>
> I thought redirect a port (for example 20202) from my ip public (for
> example 8.8.8.8) to the 22 port the my ip private (for example
> 192.168.0.100) but if I do this, When I am working from Internet, I should
> use this command:
>
> *git remote add origin [email protected]:20202:Project/REPO.git*
>

Federico,
To use a different port from the default, you could add a line in your
~/.ssh/config specifying which port to use for a given host. I'm assuming
you'll always want to use the same port from that computer (ie not
sometimes from the LAN and other times from the outside):

Host gitorious.globallogic.com
  Host 8.8.8.8
  Port 20202

This would make all connections to gitorious.globallogic.com from that
machine use that host and port.

Another option would be to use ProxyCommand in ~/.ssh/config to connect to
a gateway server that's publicly available and can connect to the Gitorious
server. Some people use netcat (nc) for this, or you could build something
yourself (I imagine you could use exec and ssh for something even easier).
Do a search for "nc git ssh proxycommand" and you should find something
that works.

Cheers,
- Marius

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]

Reply via email to