[SAC] [OSGeo] #2457: enable ssh git on gitea

OSGeo trac_osgeo at osgeo.org
Sat May 9 23:18:10 PDT 2020


#2457: enable ssh git on gitea
---------------------------+------------------------
 Reporter:  robe           |       Owner:  sac@…
     Type:  task           |      Status:  new
 Priority:  normal         |   Milestone:  Unplanned
Component:  Systems Admin  |  Resolution:
 Keywords:                 |
---------------------------+------------------------

Comment (by robe):

 I've enabled it on gitea dev instance.  Steps I did to enable it

 in the /home/git/gitea/custom/app.ini

 I changed the following lines
 {{{
 [server]
 DISABLE_SSH = false
 SSH_PORT = 3002
 START_SSH_SERVER = true #this one I had to add
 SSH_DOMAIN = dev.git.osgeo.org
 }}}

 then do


 {{{
 service gitea restart
 }}}


 On osgeo4 host whitelisted that port and added tracsvn-dev as proxy


 {{{
 ufw allow 3002 comment "tracsvn gitea ssh"
 lxc config device add tracsvn-dev proxyportgiteassh proxy
 listen=tcp:140.211.15.32:3002 connect=tcp:127.0.0.1:3002 bind=host
 }}}

 Then to test I logged into https://dev.gitea.osgeo.org/gitea - went to
 settings and added my ssh public key to my profile

 Then from my local computer did below and also did a test commit


 {{{
 git clone ssh://git@dev.git.osgeo.org:3002/postgis/postgis.git postgis-dev
 }}}

 I went back to https://dev.gitea.osgeo.org/gitea and it showed on my
 profile next to my public key "Last used on May 09, 2020"

 To change an existing dev repo I had I did this


 {{{
 git remote set-url origin
 ssh://git@dev.git.osgeo.org:3002/postgis/postgis.git
 }}}

-- 
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/2457#comment:1>
OSGeo <https://osgeo.org/>
OSGeo committee and general foundation issue tracker.


More information about the Sac mailing list