[OSGeo] #2457: enable ssh git on gitea

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[OSGeo] #2457: enable ssh git on gitea

OSGeo
#2457: enable ssh git on gitea
---------------------------+-----------------------
 Reporter:  robe           |      Owner:  sac@…
     Type:  task           |     Status:  new
 Priority:  normal         |  Milestone:  Unplanned
Component:  Systems Admin  |   Keywords:
---------------------------+-----------------------
 Some folks would prefer using ssh for git and their ssh key.
 This is something github offers and something gitea offers as well.
 We have it disabled on gitea though..

 I'd like to enable it using gitea's internal ssh server.

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

_______________________________________________
Sac mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/sac
Reply | Threaded
Open this post in threaded view
|

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

OSGeo
#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://[hidden email]: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://[hidden email]: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.

_______________________________________________
Sac mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/sac
Reply | Threaded
Open this post in threaded view
|

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

OSGeo
In reply to this post by OSGeo
#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 strk):

 I don't like the custom port. Would be nice to be able to craft something
 with the host's SSH server. I suspect it's possible without too much
 hassle.

 Also please see ticket #2116 for a way to use LDAP for ssh keys as well
 (Gitea does support that):
 https://github.com/go-gitea/gitea/pull/1844

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

_______________________________________________
Sac mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/sac
Reply | Threaded
Open this post in threaded view
|

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

OSGeo
In reply to this post by OSGeo
#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 strk):

 Now that SSH keys can be stored in LDAP (#2116) we should enable Gitea
 syncing of those keys from LDAP.

 See https://github.com/go-
 gitea/gitea/blob/master/custom/conf/app.ini.sample#L874 for instructions

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

_______________________________________________
Sac mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/sac