mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-02 10:54:25 +02:00
Add new config option for builtin SSH server
Config option [server] SSH_LISTEN_PORT to the port the builtin SSH server will be listen. It can be different from SSH_PORT which is supposed to be exposed in the clone URL. This should solve the problem when user runs Gogs inside Docker container and still want to use builtin SSH server.
This commit is contained in:
1 parent
baaf6046a1
commit
4438b7793b
6 files changed
+14
-7
No files matched your search
@@ -282,7 +282,7 @@ func (fi bindataFileInfo) Sys() interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
var _confAppIni = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xb4\x5a\x4b\x6f\x23\x49\x72\xbe\xd7\xaf\xc8\xd1\x78\x3d\xdd\x06\x49\xbd\x5a\xdd\x3d\xda\xd5\x7a\x28\xb2\x28\x71\x9b\xaf\xa9\xa2\xba\xa7\xa7\x21\x94\x4a\xac\x24\x99\xa3\x62\x15\xbb\xb2\x4a\x6a\x0d\x7c\xd8\x81\x0f\x06\x7c\xb5\x61\x5f\x0c\xc3\x3e\x18\x06\xd6\x0f\x78\xe1\xcb\xae\x0d\x9f\x06\xbe\xf7\xfc\x87\xc5\xac\xfd\x2f\xfc\x45\x64\x16\x59\x54\x6b\x04\x2f\x60\xcf\x43\x2c\x66\x65\x46\x66\x46\x46\x7c\xf1\x45\x24\x3f\x16\x03\xf7\xa5\xeb\x09\xfe\xd3\x1f\xb6\xbb\x9d\xd7\x62\x7c\xda\xf5\x45\xa7\xdb\x73\x9d\x8f\xc5\xa8\xe7\x36\x7d\x57\xf4\x9b\x2f\x5c\xd1\x3a\x6d\x0e\x4e\x5c\x5f\x0c\x07\xa2\x35\xf4\x3c\xd7\x1f\x0d\x07\xed\xee\xe0\x44\xb4\xce\xfc\xf1\xb0\x8f\xc6\x41\xa7\x7b\x62\x46\x3a\x3f\x16\xcd\xe5\x52\x24\xe1\x42\x8a\x7c\x1e\xe6\x42\xcf\xd3\x1b\x2d\xd2\x44\xc8\x6b\x99\xdd\x8a\x65\x38\xc3\x0b\x95\xc7\xd2\x69\x8e\x46\xc1\xa0\xd9\x77\xc5\x91\x38\x49\x67\xfa\x10\x7f\xc5\x89\xca\x85\x2f\xb3\x6b\x35\x91\x90\xd4\x9a\x87\x09\xba\xa3\x4d\x4d\xc5\x6d\x5a\x88\xac\x48\x44\x9c\x4e\xc2\x38\xbe\x75\xbc\xb3\x41\x70\xe6\x63\xf5\x47\x62\xa6\x72\xf4\x76\x55\x3e\x97\x99\xd8\x8a\xe4\xf5\x56\x4d\x6c\x2d\xb3\x34\xda\x12\x29\x1a\x72\xa9\x73\xb4\x44\x72\x1a\x16\x31\x64\x69\xd3\x87\x25\x60\xeb\xb4\x00\x7c\x77\x9c\x37\x99\x5c\xa6\x5a\xe5\x69\x76\x7b\xee\x78\xc3\xe1\x58\x1c\x39\x7e\xcb\xeb\x8e\xc6\xc1\xf8\xf5\x88\xba\x5d\x86\x7a\x8e\x99\xda\x56\x52\x73\xe0\x77\xc5\x64\x1e\x66\x5a\xe6\x0e\x7d\x09\xa0\x2a\xcf\x77\x31\x50\xa0\x5b\x27\xcd\x26\xd2\xee\x3b\x91\x37\x62\x2d\x5e\xe4\xa9\xb8\x94\x62\x99\xa9\xeb\x30\x97\x4e\x67\xe8\xb5\xdc\x60\xe4\x75\x5f\x36\xc7\x34\xcd\x34\x8c\x35\xed\xff\x24\x4e\x2f\xc3\x58\x2c\xc2\x77\x6a\x51\x2c\xc4\x24\x93\x61\xae\xa0\xca\x58\x2d\xa0\x93\x74\x5a\x95\xb8\xc4\xd6\x0b\x2d\xb3\x9a\xa8\xef\x8a\x85\x0c\x13\x2d\x92\xd4\xf4\x74\xfa\xcd\x2f\x82\x96\xe7\x36\xc7\xdd\xe1\x20\xe8\x75\xfb\x5d\x5a\x60\x7d\x17\x33\x8c\xc2\x7c\x32\x17\xa4\x20\xf1\xb6\x90\x85\x14\xb1\x4c\x66\xf9\xbc\x86\x39\xaf\x58\xf1\xa1\x16\x71\x98\xe1\x10\xf0\x80\xb9\xb4\xba\xc4\xc9\x8d\xce\x7a\xbd\xc0\x73\x3f\x3f\x73\xfd\x71\x80\xbf\x67\x6e\xd0\x73\x07\x27\xe3\x53\x88\xdd\xdd\xc1\x3f\xd0\x65\xa1\xce\x21\x7f\x50\x2c\x2e\xb1\xb0\xea\x52\x95\xd4\xc6\x32\xc2\x4c\xb2\x75\xc8\x48\xa8\x04\x16\x02\x55\xbd\x5b\xc6\x29\x5a\xc9\x48\x1c\xf7\x8b\x51\x6f\xe8\x41\x2d\xcd\x13\xd8\x5a\x30\x38\xeb\x43\xfa\xde\xce\x86\x50\xa5\x75\xf1\xc3\xe2\x58\x4c\xd7\xf7\xcf\xee\x08\xd9\xdd\x14\xb2\x52\x6f\xba\x80\xb2\xf4\x1d\x21\xe1\x24\x57\xd7\x2a\xbf\x15\x53\x29\x23\xa7\xe3\xba\xed\x80\xd5\x39\xec\x43\x8d\x56\xe0\x01\xe4\xbd\x0c\x63\xa8\x0f\xe2\x2e\x60\x85\x0b\x59\x9f\xa4\xd8\xca\x05\x4e\x22\x0f\x45\x1e\xce\x6a\x74\x38\x91\xb8\xbc\x15\xcd\x24\xca\x52\x15\x89\x9f\x62\x5c\x83\x56\xd2\x4c\x30\xd7\x75\x18\xa3\x8d\x07\xe1\xd0\xa0\xfb\xad\x04\xb3\x1b\xfb\x8d\x94\x0e\xa1\xf6\x2d\x71\xa3\xe2\x58\xcc\xc3\x6b\x72\x2d\xb9\xb2\x67\x9d\xdf\xc6\x64\x2d\x7d\x52\x9d\x4a\xa6\xe9\xa1\x98\xe7\xf9\x52\x1f\x6e\x6f\xc3\xac\x65\x9c\xc2\x34\x74\x63\x96\xa6\xb3\x58\x36\xb0\xc9\xed\x1b\x79\xb9\x5d\x2c\x23\x58\x9e\xde\xde\xdb\xd9\x7d\xb2\xbd\xbb\xbb\xed\x17\xcb\x65\x9a\xe5\xf5\x69\x9a\xd5\x2b\x1b\xa8\xab\xa4\xde\x9a\x67\x29\xbe\xef\x7f\xca\x2f\xed\xf2\x9d\xf1\xa9\xdb\x77\xa1\x06\x9c\x51\xd0\x77\xc7\xcd\x60\xdc\x3c\x81\x2a\x2e\x3e\x9e\x4e\x0f\xf6\x9f\xec\x5f\xb0\x09\x34\xc2\x68\xa1\x92\x4d\x43\x20\x23\x7d\xf8\xc8\xc8\xab\x37\x4f\xec\x60\xe7\x43\x5b\x7a\x50\x84\xe7\x8e\x86\x0f\x8a\x48\xd2\x1c\x18\xf3\xb0\x90\xc1\x70\xdc\x6d\xdd\x35\xc0\x83\x0d\x31\x69\x36\x0b\x13\xf5\xb5\x71\xcb\x87\x64\x0d\xbd\x93\x0f\xd6\xe3\xbc\x59\x84\xd9\x55\x94\xde\xb0\x86\xdc\x84\x0e\x19\xc7\x9b\x45\xb0\x00\x8c\xbb\x84\xbb\x5f\xc1\x27\x72\x99\x68\x88\x77\xdc\x41\xf3\xb8\xe7\x06\x40\x98\x36\x9c\x78\xe0\x06\xc7\x70\xe9\x17\x15\xb8\xe8\x29\xcd\xa8\x30\x29\x74\x9e\x2e\xc4\x99\xd7\xab\xfb\x13\x3a\xcb\xca\x36\x01\x9d\xbc\x36\xf2\x6b\x95\x5c\x69\x71\x33\x97\x09\x14\x9a\x44\x32\x53\xc9\x4c\xf4\xed\x8a\x20\x0e\xa7\x8d\xd9\xc3\xc5\x12\xab\x02\xc2\xd6\x16\xe1\x2c\x01\xce\x19\xd0\x0f\x20\x3d\xf0\x5b\x64\x04\x3e\x60\xd2\x79\x83\x53\x05\xd0\x9d\x3b\x23\x6f\x38\x1e\xc2\x2c\xb0\x2e\xb2\x42\xa7\x3d\xec\x37\xbb\x03\x7c\x63\xdc\x9e\xa7\x3a\x67\x68\xa5\xf1\x68\xfc\xd1\xa3\xb2\xff\x63\xb2\xd7\x1f\x3d\x32\xdd\xf1\xe5\x47\x8f\x4e\xc7\xe3\x51\x30\x1a\x7a\xe3\xc7\x7a\xdb\xe1\x2f\xcd\x76\x1b\x70\xef\xac\x5e\x40\xc0\x3e\xa1\x0d\xb6\x4e\xc2\xc5\xa3\x76\xff\xcb\xc7\xb4\x6f\x5e\x3b\x05\x15\x71\x93\x66\x57\x64\x6f\x8f\x74\x01\xa0\xc3\xae\x7d\xff\x54\x18\xe3\x7f\x0c\xdf\x86\x09\x68\xda\x36\x5c\x42\x68\x13\x77\x1a\x10\xd7\x4d\xc4\x02\x2b\x15\x93\x50\x43\x79\x14\x79\xa2\x94\x4c\x06\x30\x0e\xdd\x01\xbc\x27\x26\x32\x55\xdd\xf0\x9a\x00\x80\x06\x37\xe3\x1c\xc6\x41\x00\x9d\xc4\xb7\x36\x72\x65\x3c\xaf\xd1\x11\x04\x45\x92\xa2\x10\x09\x24\x09\x9a\x82\x25\x96\x46\xfb\xe2\x97\x0d\xa7\x37\x6c\x35\x01\xb1\x6b\x45\x91\x2e\xa1\xa0\x95\x12\xef\xea\x07\x41\xc9\xa0\x04\x4f\x34\x45\xa0\x28\x70\xda\x7c\xb8\x34\x4d\x78\x1d\xaa\x98\x5e\x3b\xed\xae\xcf\x66\x44\xdd\xd6\xa6\xf3\x6a\x2e\x39\x78\xc2\x39\xc5\x65\xa1\xe2\x1c\xb6\x5b\x59\Line truncated
|
||||
var _confAppIni = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xb4\x5a\x5b\x6f\xe3\x48\x76\x7e\xe7\xaf\xa8\xf1\x64\xd2\xdd\x01\x25\xf9\xd2\xee\xee\xf1\x8c\x37\x23\x4b\x94\xad\x6d\xdd\x86\x94\xbb\xa7\xa7\x61\xd0\xb4\x58\x92\x38\xa6\x48\x35\x8b\xb4\xdb\x83\x20\xd8\x41\x1e\x02\xe4\x35\x41\xf2\x12\x04\xc9\x43\x10\x60\x73\x41\x16\x79\xd9\x4d\x90\xa7\x41\xde\xbb\xff\xc3\x62\x36\xf9\x17\xf9\xce\xa9\xa2\x44\xb9\x3d\x4e\x16\x48\xe6\x62\x51\xc5\xaa\x53\x55\xe7\xf6\x7d\xa7\x4a\x1f\x8b\x81\xf3\xc2\x71\x05\xff\xe9\x0f\xdb\xdd\xce\x2b\x31\x3e\xe9\x7a\xa2\xd3\xed\x39\xd6\xc7\x62\xd4\x73\x9a\x9e\x23\xfa\xcd\xe7\x8e\x68\x9d\x34\x07\xc7\x8e\x27\x86\x03\xd1\x1a\xba\xae\xe3\x8d\x86\x83\x76\x77\x70\x2c\x5a\xa7\xde\x78\xd8\x47\xe3\xa0\xd3\x3d\xd6\x23\xad\xcf\x44\x73\xb9\x14\x49\xb0\x90\x22\x9f\x07\xb9\x50\xf3\xf4\x5a\x89\x34\x11\xf2\x4a\x66\x37\x62\x19\xcc\xf0\x22\xca\x63\x69\x35\x47\x23\x7f\xd0\xec\x3b\xe2\x50\x1c\xa7\x33\x75\x80\xbf\xe2\x38\xca\x85\x27\xb3\xab\x68\x22\x21\xa9\x35\x0f\x12\x74\x47\x5b\x34\x15\x37\x69\x21\xb2\x22\x11\x71\x3a\x09\xe2\xf8\xc6\x72\x4f\x07\xfe\xa9\x87\xd5\x1f\x8a\x59\x94\xa3\xb7\x13\xe5\x73\x99\x89\xad\x50\x5e\x6d\xd9\x62\x6b\x99\xa5\xe1\x96\x48\xd1\x90\x4b\x95\xa3\x25\x94\xd3\xa0\x88\x21\x4b\xe9\x3e\x2c\x01\x5b\xa7\x05\xe0\xbb\x65\xbd\xce\xe4\x32\x55\x51\x9e\x66\x37\x67\x96\x3b\x1c\x8e\xc5\xa1\xe5\xb5\xdc\xee\x68\xec\x8f\x5f\x8d\xa8\xdb\x45\xa0\xe6\x98\xa9\x6d\x24\x35\x07\x5e\x57\x4c\xe6\x41\xa6\x64\x6e\xd1\x17\x1f\xaa\x72\x3d\x07\x03\x05\xba\x75\xd2\x6c\x22\xcd\xbe\x13\x79\x2d\xd6\xe2\x45\x9e\x8a\x0b\x29\x96\x59\x74\x15\xe4\xd2\xea\x0c\xdd\x96\xe3\x8f\xdc\xee\x8b\xe6\x98\xa6\x99\x06\xb1\xa2\xfd\x1f\xc7\xe9\x45\x10\x8b\x45\xf0\x36\x5a\x14\x0b\x31\xc9\x64\x90\x47\x50\x65\x1c\x2d\xa0\x93\x74\x5a\x95\xb8\xc4\xd6\x0b\x25\x33\x5b\xd4\x76\xc4\x42\x06\x89\x12\x49\xaa\x7b\x5a\xfd\xe6\x57\x7e\xcb\x75\x9a\xe3\xee\x70\xe0\xf7\xba\xfd\x2e\x2d\xb0\xb6\x83\x19\x46\x41\x3e\x99\x0b\x52\x90\x78\x53\xc8\x42\x8a\x58\x26\xb3\x7c\x6e\x63\xce\x4b\x56\x7c\xa0\x44\x1c\x64\x30\x02\x1e\x30\x97\x8a\x2e\x60\xb9\xd1\x69\xaf\xe7\xbb\xce\x97\xa7\x8e\x37\xf6\xf1\xf7\xd4\xf1\x7b\xce\xe0\x78\x7c\x02\xb1\x3b\xdb\xf8\x07\xba\x2c\xa2\x33\xc8\x1f\x14\x8b\x0b\x2c\xac\xba\xd4\x48\x2a\xed\x19\x41\x26\xd9\x3b\x64\x28\xa2\x04\x1e\x02\x55\xbd\x5d\xc6\x29\x5a\xc9\x49\x2c\xe7\xab\x51\x6f\xe8\x42\x2d\xcd\x63\xf8\x9a\x3f\x38\xed\x43\xfa\xee\xf6\x86\xd0\x48\xa9\xe2\xc7\xc5\xb1\x98\xae\xe7\x9d\xde\x12\xb2\xb3\x29\x64\xa5\xde\x74\x01\x65\xa9\x5b\x42\x82\x49\x1e\x5d\x45\xf9\x8d\x98\x4a\x19\x5a\x1d\xc7\x69\xfb\xac\xce\x61\x1f\x6a\x34\x02\xf7\x21\xef\x45\x10\x43\x7d\x10\x77\x0e\x2f\x5c\xc8\xda\x24\xc5\x56\xce\x61\x89\x3c\x10\x79\x30\xb3\xc9\x38\xa1\xb8\xb8\x11\xcd\x24\xcc\xd2\x28\x14\x3f\xc1\xb8\x3a\xad\xa4\x99\x60\xae\xab\x20\x46\x1b\x0f\x82\xd1\xa0\xfb\xad\x04\xb3\x6b\xff\x0d\x23\x15\x40\xed\x5b\xe2\x3a\x8a\x63\x31\x0f\xae\x28\xb4\xe4\xca\x9f\x55\x7e\x13\x93\xb7\xf4\x49\x75\x51\x32\x4d\x0f\xc4\x3c\xcf\x97\xea\xa0\xd1\x80\x5b\xcb\x38\x85\x6b\xa8\xfa\x2c\x4d\x67\xb1\xac\x63\x93\x8d\x6b\x79\xd1\x28\x96\x21\x3c\x4f\x35\x76\xb7\x77\x1e\x37\x76\x76\x1a\x5e\xb1\x5c\xa6\x59\x5e\x9b\xa6\x59\xad\xb2\x81\x5a\x94\xd4\x5a\xf3\x2c\xc5\xf7\xbd\x4f\xf9\xa5\x59\xbe\x35\x3e\x71\xfa\x0e\xd4\x00\x1b\xf9\x7d\x67\xdc\xf4\xc7\xcd\x63\xa8\xe2\xfc\xe3\xe9\x74\x7f\xef\xf1\xde\x39\xbb\x40\x3d\x08\x17\x51\xb2\xe9\x08\xe4\xa4\xf7\x9b\x8c\xa2\x7a\xd3\x62\xfb\xdb\x1f\xfa\xd2\xbd\x22\x5c\x67\x34\xbc\x57\x44\x92\xe6\xc8\x31\xf7\x0b\x19\x0c\xc7\xdd\xd6\x6d\x07\xdc\xdf\x10\x93\x66\xb3\x20\x89\xbe\xd5\x61\x79\x9f\xac\xa1\x7b\xfc\xc1\x7a\xac\xd7\x8b\x20\xbb\x0c\xd3\x6b\xd6\x90\x93\x90\x91\x61\xde\x2c\x84\x07\x60\xdc\x05\xc2\xfd\x12\x31\x91\xcb\x44\x41\xbc\xe5\x0c\x9a\x47\x3d\xc7\x47\x86\x69\x23\x88\x07\x8e\x7f\x84\x90\x7e\x5e\x49\x17\xbd\x48\x71\x56\x98\x14\x2a\x4f\x17\xe2\xd4\xed\xd5\xbc\x09\xd9\xb2\xb2\x4d\xa4\x4e\x5e\x1b\xc5\x75\x94\x5c\x2a\x71\x3d\x97\x09\x14\x9a\x84\x32\x8b\x92\x99\xe8\x9b\x15\x41\x1c\xac\x8d\xd9\x83\xc5\x12\xab\x42\x86\xb5\x17\xc1\x2c\x41\x9e\xd3\x49\xdf\x87\x74\xdf\x6b\x91\x13\x78\x48\x93\xd6\x6b\x58\x15\x89\xee\xcc\x1a\xb9\xc3\xf1\x10\x6e\x81\x75\x91\x17\x5a\xed\x61\xbf\xd9\x1d\xe0\x1b\xe7\xed\x79\xaa\x72\x4e\xad\x34\x1e\x8d\x9f\x3c\x2c\xfb\x3f\x22\x7f\xfd\xe4\xa1\xee\x8e\x2f\x9f\x3c\x3c\x19\x8f\x47\xfe\x68\xe8\x8e\x1f\xa9\x86\xc5\x5f\x9a\xed\x36\xd2\xbd\xb5\x7a\x01\x01\x7b\x94\x6d\xb0\x75\x12\x2e\x1e\xb6\xfb\x5f\x3f\xa2\x7d\xf3\xda\x09\x54\xc4\x75\x9a\x5d\x92\xbf\x3d\x54\x05\x12\x1d\x76\xed\x79\x27\x42\x3b\xff\x23\xc4\x36\x5c\x40\xd1\xb6\x11\x12\x42\x69\xdc\xa9\x43\x5c\x37\x11\x0b\xac\x54\x4c\x02\x05\xe5\x11\xf2\x84\x29\xb9\x0c\xd2\x38\x74\x87\xe4\x3d\xd1\xc8\x54\x0d\xc3\x2b\x4a\x00\x34\xb8\x19\xe7\x70\x0e\x4a\xd0\x49\x7c\x63\x90\x2b\xe3\x79\xb5\x8e\x20\x28\x94\x84\x42\x24\x90\x24\x28\x02\x4b\x2c\x8d\xf6\xc5\x2f\xeb\x56\x6f\xd8\x6a\x22\xc5\xae\x15\x45\xba\x84\x82\x56\x4a\xbc\xad\x1f\x80\x92\xce\x12\x3c\xd1\x14\x40\x51\xc0\xda\x6c\x5c\x9a\x26\xb8\x0a\xa2\x98\x5e\x5b\xed\xae\xc7\x6e\x44\xdd\xd6\xae\xf3\x72\x2e\x19\x3c\x11\x9c\xe2\xa2\x88\xe2\x1c\xbe\x5b\x59\Line truncated
|
||||
|
||||
func confAppIniBytes() ([]byte, error) {
|
||||
return bindataRead(
|
||||
@@ -297,7 +297,7 @@ func confAppIni() (*asset, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "conf/app.ini", size: 10329, mode: os.FileMode(420), modTime: time.Unix(1455859268, 0)}
|
||||
info := bindataFileInfo{name: "conf/app.ini", size: 10570, mode: os.FileMode(420), modTime: time.Unix(1456377168, 0)}
|
||||
a := &asset{bytes: bytes, info: info}
|
||||
return a, nil
|
||||
}
|
||||
|
||||
@@ -65,6 +65,7 @@ var (
|
||||
StartSSHServer bool
|
||||
SSHDomain string
|
||||
SSHPort int
|
||||
SSHListenPort int
|
||||
SSHRootPath string
|
||||
OfflineMode bool
|
||||
DisableRouterLog bool
|
||||
@@ -324,6 +325,7 @@ func NewContext() {
|
||||
}
|
||||
SSHDomain = sec.Key("SSH_DOMAIN").MustString(Domain)
|
||||
SSHPort = sec.Key("SSH_PORT").MustInt(22)
|
||||
SSHListenPort = sec.Key("SSH_LISTEN_PORT").MustInt(SSHPort)
|
||||
SSHRootPath = sec.Key("SSH_ROOT_PATH").MustString(path.Join(homeDir, ".ssh"))
|
||||
if err := os.MkdirAll(SSHRootPath, 0700); err != nil {
|
||||
log.Fatal(4, "Fail to create '%s': %v", SSHRootPath, err)
|
||||
|
||||
Reference in new issue
Block a user