Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Gitea
  3. Authenticating to gitea from git after switch to using OID authentication

Authenticating to gitea from git after switch to using OID authentication

Scheduled Pinned Locked Moved Gitea
3 Posts 2 Posters 10.8k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • ChristopherMagC Offline
    ChristopherMagC Offline
    ChristopherMag
    wrote on last edited by
    #1

    After the recent app update that switched to using open ID (OID) my local git was not able to authenticate with gitea.

    If you login to the gitea website, click on your profile image on the top right, and then select Settings.
    From the Settings screen select the Applications side menu option and then under Generate New Token, enter a token name, expand the select permissions, and in my case I gave it all permissions, you can probably get away with Repository and Organization but I haven't tested to confirm.

    Click Generate token and then save the generated token so you can refer to it later.

    Now do something like a git pull from a repo with gitea as the remote and when asked for the username use your cloudron username, and for the password use the access token.

    I could be mistaken and I just happened to be dealing with another issue at the same time and this isn't related to the OID update and we can just delete this post if it isn't relevant but I didn't want to leave the next person without tracks in the sand if this is in fact going to happen to everyone who were using gitea and using the a username and password before but now need to use OID.

    1 Reply Last reply
    1
    • nebulonN Offline
      nebulonN Offline
      nebulon
      Staff
      wrote on last edited by
      #2

      most likely this is related to the OpenID migration as now the app does not handle username+password on its own, so it never sees the password. I guess the best way for using gitea with git locally is to use ssh key pairs instead of basic auth.

      1 Reply Last reply
      0
      • ChristopherMagC Offline
        ChristopherMagC Offline
        ChristopherMag
        wrote on last edited by
        #3

        @nebulon That is probably a great idea, I have not used this before.

        I have gone to Gitea, go to Settings, and on the left hand menu select SSH/GPG Keys it gives me the ability to add an existing SSH public key.

        It also says that "SSH is currently disabled so these keys are only used for commit signature verification"

        image.png

        It does look like there is an option to enable the SSH port under the Location settings of the app so to make this work the way your describing I believe someone would need to:

        • Install Gitea
        • Enable Location > SSH port
        • Generate ssh key pair using ssh-keygen
        • Open Gitea > Settings > SSH/GPG keys
        • Click Add Key and add the public key portion of your generated ssh key and click Add Key button at the bottom

        Given that SSH isn't enabled by default, that there are additional steps and tools needed, and that there is no way to do OID login via the git cli tool (that I know of) it seems like the Generate Token option would be the expected default choice for new users of gitea on cloudron with more advanced or experienced users going through the additional steps to use SSH if that is more consistent with their workflow.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Bookmarks
        • Search