So I initially had been using gitea. It took me a while to get ssh to work properly but then it did. Then I learned of forgejo and decided to go full foss. Only problem is that i cant get ssh to work for the life of me. Here’s my setup

  • Forgejo is in a docker compose file in which I’ve setup a docker network
  • My ssh port for my server is not 22
  • I followed the gitea sshing shim directions I used previously to a T and couldn’t get any sort of anything to work

My best guess is there’s some base configuration difference between the two that I don’t know of that maybe somebody here can point out for me. Any help would be appreciated, thanks.

  • Suzune@ani.social
    link
    fedilink
    English
    arrow-up
    13
    arrow-down
    1
    ·
    2 days ago

    It would help if you explain “it does not work” further. It’s a bad desciption of the situation and we cannot look directly at your installation.

    • galaxy_nova@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      1
      arrow-down
      2
      ·
      edit-2
      24 hours ago

      Ok. The issues lies somewhere in the actual connection. Adding ssh keys to my instance shows up properly in the known keys. Whenever I attempt to connect either on the actual server itself as a test or via trying to clone over ssh or even connect via ssh itself I get public key denials. If you want I can provide you my ssh config on server, my docked compose file, the verbose output of the ssh connections in various facets although they haven’t appeared to be very helpful, or whatever else can be helpful

      Edit would someone like to enlighten me why they’re randomly downvoting this? Would you all have preferred I just dumped logs? I genuinely don’t understand. My main question was actually whether there is a difference between gitea and forgejo since I’ve already verified this exact setup worked there. So if anything an answer to my original question would require 0 input from me. I do appreciate the help from everyone but to say that me saying “it doesn’t work” is unhelpful is missing the point

      • seang96@spgrn.com
        link
        fedilink
        English
        arrow-up
        1
        ·
        13 hours ago

        If public key is denied forgejo is setup, but you have an old connection in your authorized_keys file probably form using gitea. Remove the line, it should prompt you to accept public key on next ssh session. This is a basic ssh functionality probably why you were downvoted I guess.

        Gitea and forgejo configs were 100% same at some point, check forgejo news for when the last version that supported gitea migrations. That said it should still be pretty close.

      • doeknius_gloek@discuss.tchncs.de
        link
        fedilink
        English
        arrow-up
        4
        ·
        edit-2
        2 days ago

        Check the permissions/owner of the authorized_keys file. I’m not at home right now to give you the path to it, but I have had a similar problem after I add a new ssh key to my gitea/forgejo account. It turned out that in doing so, sometimes the permissions change and gitea/forgejo then refuses to use the file. You should see warnings about this in the logs.

        In my case the problem is probably rooted within the uid/gid thats used inside the container and/or the nfs mount I use for the container volume. I never bothered to get to the bottom of it though.

      • Suzune@ani.social
        link
        fedilink
        English
        arrow-up
        3
        ·
        2 days ago

        So sshd is running. The first question is: is it running on the port you expect it to run? The main host can have sshd too and maybe you connect to the wrong port? Did you use a ~/.ssh/config for your forgejo connection?

        • galaxy_nova@lemmy.worldOP
          link
          fedilink
          English
          arrow-up
          1
          ·
          24 hours ago

          I don’t have an explicit config file no, I don’t remember needing it before though. I’ve followed the steps https://docs.gitea.com/installation/install-with-docker which worked with gitea but doesn’t work with forgejo. I didn’t see anything that mentioned needing a config for the first method listed there at least. I suppose I could try some of the other methods listed there but I liked option A the best generally.

          • Suzune@ani.social
            link
            fedilink
            English
            arrow-up
            1
            ·
            14 hours ago

            If you have forgejo or gitea ssh running on port 222, you need to specify it somewhere. Or else git could connect to port 22, which is default for ssh.