• Jeena@piefed.jeena.net
    link
    fedilink
    English
    arrow-up
    11
    ·
    7 hours ago

    So yesterday I set up forgejo, which is the software behind codeberg, and imported all my 88 git repos from github, so far so good.

    But then I spent the rest of the day trying to figure out how to be able to use port 22, which I already use for sshd to share it with forgejo so I could clone and push to it without the need of a non standart Port and I am almost giving up on it, almost. I will try today again, but I’m running out of options and the documentation is not telling me how to set it up.

    Any tips are welcome!

    • Kairos@lemmy.today
      link
      fedilink
      arrow-up
      5
      ·
      7 hours ago

      You have to

      1. Make sure access is allowed on the sshd server side for the user Forgejo is running on
      2. Ensure it’s enabled in Forgejo settings
      3. Add your SSH key into your user settings
    • poVoq@slrpnk.net
      link
      fedilink
      arrow-up
      3
      arrow-down
      1
      ·
      5 hours ago

      Why the need to push via ssh? I am genuinely wondering, since you can easily push without having that enabled at all.

      • Jeena@piefed.jeena.net
        link
        fedilink
        English
        arrow-up
        3
        ·
        5 hours ago

        Because otherwise I will need to set up a different way of logging in to authenticate on every computer. I’m using ssh for every git server. How do you authenticate, with a different access token for each git server in ~/.gitconfig?

    • Gamma@beehaw.org
      link
      fedilink
      English
      arrow-up
      3
      ·
      edit-2
      7 hours ago

      Odd, setting this up with gitea (which forgejo was forked from) was painless, maybe their guide will help. There is a few different options

      • Jeena@piefed.jeena.net
        link
        fedilink
        English
        arrow-up
        5
        ·
        5 hours ago

        So interesting, actually yesterday I was sporadically reading that page but not following it exactly. Now that you posted the link I really paid attention and followed it again, and I have the feeling I did exactly the same steps, but now it just worked!

        Thanks so much, this is awesome, now I really don’t need GitHub anymore.

        Here is the script I used to migrate: https://git.jeena.net/jeena/github2forgejo

        • Gamma@beehaw.org
          link
          fedilink
          English
          arrow-up
          3
          ·
          4 hours ago

          I’m glad it helped! From what I remember when I checked out forgejo their documentation was really lacking, but some of it has gotten better since they did the hard fork