Skip to content

Commit af9d0ec

Browse files
committed
Merge branch 'master' into wiki_revisions
2 parents 417b010 + ed676f9 commit af9d0ec

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+2627
-229
lines changed

.drone.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,11 @@ steps:
6363

6464
- name: build-without-gcc
6565
pull: always
66-
image: golang:1.10 # this step is kept as the lowest version of golang that we support
66+
image: golang:1.11 # this step is kept as the lowest version of golang that we support
67+
environment:
68+
GO111MODULE: on
6769
commands:
68-
- go build -o gitea_no_gcc # test if build succeeds without the sqlite tag
70+
- go build -mod=vendor -o gitea_no_gcc # test if build succeeds without the sqlite tag
6971

7072
- name: build
7173
pull: always

CHANGELOG.md

Lines changed: 318 additions & 0 deletions
Large diffs are not rendered by default.

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ vet:
9797

9898
.PHONY: generate
9999
generate:
100-
GO111MODULE=on $(GO) generate $(PACKAGES)
100+
GO111MODULE=on $(GO) generate -mod=vendor $(PACKAGES)
101101

102102
.PHONY: generate-swagger
103103
generate-swagger:

docker/root/etc/s6/openssh/setup

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ if [ ! -f /data/ssh/ssh_host_ecdsa_key ]; then
2424
ssh-keygen -t ecdsa -b 256 -f /data/ssh/ssh_host_ecdsa_key -N "" > /dev/null
2525
fi
2626

27+
if [ -d /etc/ssh ]; then
28+
SSH_PORT=${SSH_PORT:-"22"} \
29+
envsubst < /etc/templates/sshd_config > /etc/ssh/sshd_config
30+
31+
chmod 0644 /etc/ssh/sshd_config
32+
fi
33+
2734
chown root:root /data/ssh/*
2835
chmod 0700 /data/ssh
2936
chmod 0600 /data/ssh/*

docker/root/etc/ssh/sshd_config renamed to docker/root/etc/templates/sshd_config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Port 22
1+
Port ${SSH_PORT}
22
Protocol 2
33

44
AddressFamily any

docs/content/doc/advanced/hacking-on-gitea.en-us.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ necessary. To be able to use these you must have the `"$GOPATH"/bin` directory
3232
on the executable path. If you don't add the go bin directory to the
3333
executable path you will have to manage this yourself.
3434

35-
**Note 2**: Go version 1.9 or higher is required; however, it is important
35+
**Note 2**: Go version 1.11 or higher is required; however, it is important
3636
to note that our continuous integration will check that the formatting of the
3737
source code is not changed by `gofmt` using `make fmt-check`. Unfortunately,
3838
the results of `gofmt` can differ by the version of `go`. It is therefore

docs/content/doc/installation/from-source.en-us.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ necessary. To be able to use these, you must have the `"$GOPATH/bin"` directory
2727
on the executable path. If you don't add the go bin directory to the
2828
executable path, you will have to manage this yourself.
2929

30-
**Note 2**: Go version 1.9 or higher is required. However, it is recommended to
30+
**Note 2**: Go version 1.11 or higher is required. However, it is recommended to
3131
obtain the same version as our continuous integration, see the advice given in
3232
<a href='{{< relref "doc/advanced/hacking-on-gitea.en-us.md" >}}'>Hacking on
3333
Gitea</a>

go.mod

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ require (
4040
github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 // indirect
4141
github.com/facebookgo/stats v0.0.0-20151006221625-1b76add642e4 // indirect
4242
github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870 // indirect
43-
github.com/gliderlabs/ssh v0.1.4 // indirect
43+
github.com/gliderlabs/ssh v0.2.2
4444
github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd // indirect
4545
github.com/glycerine/goconvey v0.0.0-20190315024820-982ee783a72e // indirect
4646
github.com/go-macaron/binding v0.0.0-20160711225916-9440f336b443
@@ -110,11 +110,11 @@ require (
110110
github.com/yohcop/openid-go v0.0.0-20160914080427-2c050d2dae53
111111
go.etcd.io/bbolt v1.3.2 // indirect
112112
golang.org/x/crypto v0.0.0-20190618222545-ea8f1a30c443
113-
golang.org/x/net v0.0.0-20190613194153-d28f0bde5980
113+
golang.org/x/net v0.0.0-20190619014844-b5b0513f8c1b
114114
golang.org/x/oauth2 v0.0.0-20181101160152-c453e0c75759
115-
golang.org/x/sys v0.0.0-20190618155005-516e3c20635f
115+
golang.org/x/sys v0.0.0-20190620070143-6f217b454f45
116116
golang.org/x/text v0.3.2
117-
golang.org/x/tools v0.0.0-20190618163018-fdf1049a943a // indirect
117+
golang.org/x/tools v0.0.0-20190620154339-431033348dd0 // indirect
118118
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
119119
gopkg.in/asn1-ber.v1 v1.0.0-20150924051756-4e86f4367175 // indirect
120120
gopkg.in/bufio.v1 v1.0.0-20140618132640-567b2bfa514e // indirect

go.sum

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI
100100
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
101101
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
102102
github.com/gliderlabs/ssh v0.1.3/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0=
103-
github.com/gliderlabs/ssh v0.1.4 h1:5N8AYXpaQAPy0L7linKa5aI+WRfyYagAhjksVzxh+mI=
104-
github.com/gliderlabs/ssh v0.1.4/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0=
103+
github.com/gliderlabs/ssh v0.2.2 h1:6zsha5zo/TWhRhwqCD3+EarCAgZ2yN28ipRnGPnwkI0=
104+
github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0=
105105
github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd h1:r04MMPyLHj/QwZuMJ5+7tJcBr1AQjpiAK/rZWRrQT7o=
106106
github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE=
107107
github.com/glycerine/goconvey v0.0.0-20190315024820-982ee783a72e h1:SiEs4J3BKVIeaWrH3tKaz3QLZhJ68iJ/A4xrzIoE5+Y=
@@ -369,8 +369,8 @@ golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73r
369369
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
370370
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
371371
golang.org/x/net v0.0.0-20190502183928-7f726cade0ab/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
372-
golang.org/x/net v0.0.0-20190613194153-d28f0bde5980 h1:dfGZHvZk057jK2MCeWus/TowKpJ8y4AmooUzdBSR9GU=
373-
golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
372+
golang.org/x/net v0.0.0-20190619014844-b5b0513f8c1b h1:lkjdUzSyJ5P1+eal9fxXX9Xg2BTfswsonKUse48C0uE=
373+
golang.org/x/net v0.0.0-20190619014844-b5b0513f8c1b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
374374
golang.org/x/oauth2 v0.0.0-20180620175406-ef147856a6dd/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
375375
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
376376
golang.org/x/oauth2 v0.0.0-20181101160152-c453e0c75759 h1:TMrx+Qdx7uJAeUbv15N72h5Hmyb5+VDjEiMufAEAM04=
@@ -395,15 +395,15 @@ golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e h1:nFYrTHrdrAOpShe27kaFHjsqY
395395
golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
396396
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
397397
golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
398-
golang.org/x/sys v0.0.0-20190618155005-516e3c20635f h1:dHNZYIYdq2QuU6w73vZ/DzesPbVlZVYZTtTZmrnsbQ8=
399-
golang.org/x/sys v0.0.0-20190618155005-516e3c20635f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
398+
golang.org/x/sys v0.0.0-20190620070143-6f217b454f45 h1:Dl2hc890lrizvUppGbRWhnIh2f8jOTCQpY5IKWRS0oM=
399+
golang.org/x/sys v0.0.0-20190620070143-6f217b454f45/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
400400
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
401401
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
402402
golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
403403
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
404404
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
405-
golang.org/x/tools v0.0.0-20190618163018-fdf1049a943a h1:aQmaYPOmKItb96VioBrTlYay5tSNUdKAFEhPCWMeLSM=
406-
golang.org/x/tools v0.0.0-20190618163018-fdf1049a943a/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
405+
golang.org/x/tools v0.0.0-20190620154339-431033348dd0 h1:qUGDNmGEM+ZBtwF9vuzEv+9nQQPL+l/oNBZ+DCDTAyo=
406+
golang.org/x/tools v0.0.0-20190620154339-431033348dd0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
407407
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
408408
google.golang.org/appengine v1.2.0 h1:S0iUepdCWODXRvtE+gcRDd15L+k+k1AiHlMiMjefH24=
409409
google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=

integrations/mssql.ini.tmpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ LFS_CONTENT_PATH = data/lfs-mssql
3434
OFFLINE_MODE = false
3535
LFS_JWT_SECRET = Tv_MjmZuHqpIY6GFl12ebgkRAMt4RlWt0v4EHKSXO0w
3636
APP_DATA_PATH = integrations/gitea-integration-mssql/data
37+
BUILTIN_SSH_SERVER_USER = git
3738

3839
[mailer]
3940
ENABLED = true

integrations/mysql.ini.tmpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ LFS_CONTENT_PATH = data/lfs-mysql
3434
OFFLINE_MODE = false
3535
LFS_JWT_SECRET = Tv_MjmZuHqpIY6GFl12ebgkRAMt4RlWt0v4EHKSXO0w
3636
APP_DATA_PATH = integrations/gitea-integration-mysql/data
37+
BUILTIN_SSH_SERVER_USER = git
3738

3839
[mailer]
3940
ENABLED = true

integrations/mysql8.ini.tmpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ LFS_CONTENT_PATH = data/lfs-mysql8
3434
OFFLINE_MODE = false
3535
LFS_JWT_SECRET = Tv_MjmZuHqpIY6GFl12ebgkRAMt4RlWt0v4EHKSXO0w
3636
APP_DATA_PATH = integrations/gitea-integration-mysql8/data
37+
BUILTIN_SSH_SERVER_USER = git
3738

3839
[mailer]
3940
ENABLED = false

integrations/pgsql.ini.tmpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ LFS_CONTENT_PATH = data/lfs-pgsql
3434
OFFLINE_MODE = false
3535
LFS_JWT_SECRET = Tv_MjmZuHqpIY6GFl12ebgkRAMt4RlWt0v4EHKSXO0w
3636
APP_DATA_PATH = integrations/gitea-integration-pgsql/data
37+
BUILTIN_SSH_SERVER_USER = git
3738

3839
[mailer]
3940
ENABLED = true

integrations/repo_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ func TestViewRepo1CloneLinkAuthorized(t *testing.T) {
7373
assert.Equal(t, setting.AppURL+"user2/repo1.git", link)
7474
link, exists = htmlDoc.doc.Find("#repo-clone-ssh").Attr("data-link")
7575
assert.True(t, exists, "The template has changed")
76-
sshURL := fmt.Sprintf("ssh://%s@%s:%d/user2/repo1.git", setting.RunUser, setting.SSH.Domain, setting.SSH.Port)
76+
sshURL := fmt.Sprintf("ssh://%s@%s:%d/user2/repo1.git", setting.SSH.BuiltinServerUser, setting.SSH.Domain, setting.SSH.Port)
7777
assert.Equal(t, sshURL, link)
7878
}
7979

integrations/sqlite.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ OFFLINE_MODE = false
3131
LFS_JWT_SECRET = Tv_MjmZuHqpIY6GFl12ebgkRAMt4RlWt0v4EHKSXO0w
3232
APP_DATA_PATH = integrations/gitea-integration-sqlite/data
3333
ENABLE_GZIP = true
34+
BUILTIN_SSH_SERVER_USER = git
3435

3536
[mailer]
3637
ENABLED = true

0 commit comments

Comments
 (0)