Changes for page How to set up a gitea docker instance
Last modified by Alexandru Pentilescu on 2024/07/16 22:44
From version 13.1
edited by Alexandru Pentilescu
on 2024/07/16 21:59
on 2024/07/16 21:59
Change comment:
There is no comment for this version
To version 6.1
edited by Alexandru Pentilescu
on 2024/07/16 21:25
on 2024/07/16 21:25
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Attachments (0 modified, 0 added, 3 removed)
Details
- Page properties
-
- Content
-
... ... @@ -152,50 +152,3 @@ 152 152 {{/code}} 153 153 154 154 If you need more configuration information, check [[this>>https://docs.gitea.com/administration/config-cheat-sheet]] out. 155 - 156 -= Activating SSH passthrough = 157 - 158 -This is the most complex step out of all of them. In order to take advantage of the fact that SSH git pulls/pushes will be done via standard port 22, normal SSH traffic needs to be differentiated from git specific SSH traffic. 159 - 160 -To this end, multiple configurations will need to be done. 161 - 162 -This one's extremely important. Failing to perform this step will make SSH git pulls and pushes require to be done directly from the 2200 port like so 163 - 164 -{{code language="bash"}} 165 -git clone ssh://git@transistor.one:2200/Alex/Licenta.git 166 -{{/code}} 167 - 168 -While this isn't the end of the world, ideally, all SSH traffic should be routed to port 22, as is standard. VPS firewalls or intermediary ISPs may, themselves, block off incoming or outgoing traffic to unconventional ports, which can cause issues. As such, using the standard port 22 for SSH communication would be ideal. 169 - 170 -== Enable SSH login for the git user == 171 - 172 -So, to enable SSH capabilities to the git user, please edit the "/etc/ssh/sshd_config" configuration and change the following line: 173 - 174 -{{code language="text"}} 175 -AllowUsers alex git 176 -{{/code}} 177 - 178 -Obviously the "alex" user doesn't need to be here. The git user does. Change this list as best suits your needs. Don't forget to restart the service after you're done: 179 - 180 -{{code language="bash"}} 181 -systemctl restart ssh 182 -{{/code}} 183 - 184 -== Generate a proper public/private keypair for all the accounts that need to use git via SSH with == 185 - 186 -This part's pretty self explanatory. 187 - 188 -For each user, on each device, that will require SSH git access to the aforementioned git server, they will need to have their own public/private authentication keypair set under a Gitea user that's already registered on the Gitea web portal. 189 - 190 -Check to see if a public/private keypair doesn't already exist under your user's /home/<username>/.ssh/ directory. You'll recognize already existent keypairs by the presence, in this directory, of <name>.pub files. If you already have at least one such file already there, copy the contents of the <name>.pub file to the clipboard and add it to your Gitea user's settings. In case there is no such .pub file already existent, you'll have to manually generate ones for yourself. 191 - 192 -To do so, simply log into each user and run from the terminal: 193 - 194 -{{code language="bash"}} 195 -ssh-keygen 196 -{{/code}} 197 - 198 -That's pretty much it. Once you generated a keypair, again, visit the /home/<username>/.ssh/ directory and check for <name>.pub files. There should be at least one there, now. 199 - 200 -Copy its contents and add it to your Gitea's user settings through the web interface, as follows: 201 -[[image:1.png]][[image:2.png]][[image:3.png]]
- 1.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.AlexandruPentilescu - Size
-
... ... @@ -1,1 +1,0 @@ 1 -285.4 KB - Content
- 2.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.AlexandruPentilescu - Size
-
... ... @@ -1,1 +1,0 @@ 1 -589.7 KB - Content
- 3.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.AlexandruPentilescu - Size
-
... ... @@ -1,1 +1,0 @@ 1 -635.2 KB - Content