Problem with port

39 views
Skip to first unread message

Federico Don

unread,
Jul 11, 2012, 12:20:56 PM7/11/12
to gito...@googlegroups.com
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 g...@gitorious.globallogic.com.ar: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 git@8.8.8.8:20202:Project/REPO.git

I do not think this works! double ":" !!

Could you help me please?

Thanks and regards,

Marius Mårnes Mathiesen

unread,
Jul 12, 2012, 4:29:47 AM7/12/12
to gito...@googlegroups.com
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 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

Mika Suomalainen

unread,
Jul 12, 2012, 6:33:58 AM7/12/12
to gito...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On 11.07.2012 19:20, Federico Don wrote:
> 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 g...@8.8.8.8:20202:Project/REPO.git*
>

I don't understand your problem ,but if you want to use SSH protocol
with some other port than 22, you should use

git remote add origin ssh://g...@8.8.8.8:22:Project/REPO.git or something.



- --
Mika Suomalainen

NOTICE! I am on mobile broadband with very limited time, so I cannot
read emails very much.
The best time to contact me is probably weekends when I have better
connectivity with good luck.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
Comment: Homepage: http://mkaysi.github.com/
Comment: gpg --keyserver pool.sks-keyservers.net --recv-keys 82A46728
Comment: Public key: http://mkaysi.github.com/PGP/key.txt
Comment: Fingerprint = 24BC 1573 B8EE D666 D10A AA65 4DB5 3CFE 82A4 6728
Comment: Why do I (clear)sign emails? http://git.io/6FLzWg
Comment: Please send plaintext instead of HTML. http://git.io/TAc0cg
Comment: Please don't toppost. http://git.io/7-VB3g
Comment: Please remove PGP lines in replies. http://git.io/nvHrDg
Comment: Charset of this message should be UTF-8.
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBCgAGBQJP/qgSAAoJEE21PP6CpGcoh4EQAIGbxvrMd31eOT6Alsd9quiU
fti8jM6+VTmQ+M3JE+c4vxOvp30wcgWAkSgUY7WyrWpg8KvA7TsdHqzBWfbgoMiv
kONKX2ub0x0r/3n/0R0g2+3vkUPG5naaFxk93IuDeB5+llsUDU/HeCUt7ZYcuhy6
Pv+Af+hH9O3iat2Jz8PhEqIQ70sVK7YmbCt6aJnu5HlCVarMgWMwf+2loogC+9mN
wSdZ4S+aUxNM2NM29pFxKr44f0+I2v9OsbqcqHeksIkH+fWpcVW0pdtW1Ty9puR1
/1Dif9I1CcYiEPmhuu1a+ygnDlhf67GoJC1n2+YWW1/uvU9EFIFJW9eo5CC09H5m
dPje7fNxyZcXZKf14UhXijxUQBP06ntVhVMBpOvLl/kwhQHsHiOb1gMlr0ElPN5a
2YSuPIfBU/Lg4iqhk5kx5rAJCDcuWJ2h56RVDtb0s5WXqiih6syqcC3cj/w5qosz
z9K4SHZ7c3oo23wdv4rz/b0AspS07UNeCq4yR1OFh6I028e/44KUYc+nqybEF30l
ctMhbF5055zqf8UcmFwb81IFSQTMoiQsSyGEX81aepoIjx5Yd0hdVZbN/jvUGwBP
YL5TxnQnZ+Ru/fv6nAWG2JQz+1HA9BhkEqyhOJPMWm9kiy9wmqG/ndR6qYPE+hqP
i4McZKNR9Er82PoekBV6
=p9P0
-----END PGP SIGNATURE-----

Federico Don

unread,
Jul 12, 2012, 9:29:59 AM7/12/12
to gito...@googlegroups.com
Hello,

I will try this but I don't know if this is good IP:PORT:PROJECT

git remote add origin g...@8.8.8.8:20202:Project/REPO.git

This double : isn't sound good!

I will share my experience when try this!

Thanks for all!

Regards,

2012/7/12 Mika Suomalainen <s.mi...@gmail.com>

--
To post to this group, send email to gito...@googlegroups.com
To unsubscribe from this group, send email to
gitorious+...@googlegroups.com

Reply all
Reply to author
Forward
0 new messages