mirror of
https://github.com/gogs/gogs.git
synced 2026-02-28 17:20:59 +01:00
Compare commits
944 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c9e0b3b987 | ||
|
|
28766479a7 | ||
|
|
9ac940d31d | ||
|
|
b553ea45ee | ||
|
|
ac4a10456e | ||
|
|
2f3a7e53cb | ||
|
|
42c7bb7529 | ||
|
|
35140f1cc7 | ||
|
|
4f4392b83e | ||
|
|
db6c0ebf76 | ||
|
|
cf7ebfbdc8 | ||
|
|
bc8721fb6c | ||
|
|
01ba771783 | ||
|
|
9ee80e3e54 | ||
|
|
b2c6a6920f | ||
|
|
e321469884 | ||
|
|
b7ebbb4064 | ||
|
|
9a1fe801e5 | ||
|
|
6f71632e3e | ||
|
|
2844674587 | ||
|
|
0daef29053 | ||
|
|
21081836ba | ||
|
|
a2f6e1803b | ||
|
|
39c068400e | ||
|
|
47e7175b80 | ||
|
|
0b785ad967 | ||
|
|
069486d169 | ||
|
|
298ebc58c1 | ||
|
|
3fd41d138c | ||
|
|
35b02997f8 | ||
|
|
adc1ac689e | ||
|
|
528c075ad6 | ||
|
|
e577f2fff3 | ||
|
|
daf96dfae1 | ||
|
|
d4a1d9f82a | ||
|
|
f7f4ea1dcf | ||
|
|
0af3a5b603 | ||
|
|
00cf3e4dab | ||
|
|
cb6be94358 | ||
|
|
54ef1cee1d | ||
|
|
b9999427a8 | ||
|
|
ddeb076890 | ||
|
|
d06d58e461 | ||
|
|
48bb0fadc2 | ||
|
|
cd627ba16e | ||
|
|
d0a80e432d | ||
|
|
9558999698 | ||
|
|
5338808600 | ||
|
|
82da024a4d | ||
|
|
5c866fc737 | ||
|
|
d75013a0e8 | ||
|
|
1591a37ad5 | ||
|
|
3e528f34af | ||
|
|
b6437b5a4c | ||
|
|
db4951bc61 | ||
|
|
d6132aaa88 | ||
|
|
9adc8e9d3f | ||
|
|
be54b4bf26 | ||
|
|
64d90a761b | ||
|
|
4d123d0a93 | ||
|
|
5dd8308686 | ||
|
|
9c2120eb34 | ||
|
|
4f8d888e66 | ||
|
|
ca09a0b516 | ||
|
|
a43164877c | ||
|
|
515641d033 | ||
|
|
54d25c13d7 | ||
|
|
23d53561d1 | ||
|
|
0cce61de3a | ||
|
|
5b96e3fcc7 | ||
|
|
79dae254cf | ||
|
|
5b32cdd960 | ||
|
|
f9ad8d6903 | ||
|
|
1b66600bd0 | ||
|
|
dc53270da9 | ||
|
|
8ea7ba3afa | ||
|
|
ef275ebf62 | ||
|
|
22ab4fa1b0 | ||
|
|
55dfe2c978 | ||
|
|
3c3f7c2a56 | ||
|
|
0c92da7e9c | ||
|
|
8fac41768c | ||
|
|
c418b83678 | ||
|
|
b53f6357fc | ||
|
|
11ca3dedfb | ||
|
|
f77680520f | ||
|
|
2d8c414f8c | ||
|
|
ce8d4cc80b | ||
|
|
37d8d3afe9 | ||
|
|
db0026c507 | ||
|
|
51f6148851 | ||
|
|
c0549a169a | ||
|
|
1e47e2df85 | ||
|
|
5d9ef2bb12 | ||
|
|
d21d7171b0 | ||
|
|
32dcaefafa | ||
|
|
d1a60e3643 | ||
|
|
a0f9197b45 | ||
|
|
340a4595dd | ||
|
|
4c770b87c5 | ||
|
|
47f37e55e9 | ||
|
|
52d66ba6c8 | ||
|
|
437dd5272f | ||
|
|
6bdb8ec4b9 | ||
|
|
9dc3c93a6a | ||
|
|
9e22840483 | ||
|
|
8eb5120fbd | ||
|
|
8c9338a537 | ||
|
|
21b9d5fa1f | ||
|
|
4f360d8f08 | ||
|
|
dfa4b38081 | ||
|
|
e0de6cb5ad | ||
|
|
ff8578082e | ||
|
|
35977cd34c | ||
|
|
abc57b6e43 | ||
|
|
a01b4baca2 | ||
|
|
fc5985f425 | ||
|
|
23eec25274 | ||
|
|
4e7eb5be9d | ||
|
|
b375192352 | ||
|
|
0c5ba4573a | ||
|
|
69a98236bd | ||
|
|
b866dc92d7 | ||
|
|
78f4f59380 | ||
|
|
743b55b9b0 | ||
|
|
0d5d555521 | ||
|
|
80c6cc6321 | ||
|
|
6588ce52fe | ||
|
|
5094e9501c | ||
|
|
e9875edcad | ||
|
|
7e2ea7639e | ||
|
|
5b290013a9 | ||
|
|
2c28ed8c05 | ||
|
|
283c81316c | ||
|
|
beb8a77fc5 | ||
|
|
b9881d1e7b | ||
|
|
87be4623cf | ||
|
|
377530ec21 | ||
|
|
bff1e157d5 | ||
|
|
e84e0ab904 | ||
|
|
c7f56d7483 | ||
|
|
83283bca4c | ||
|
|
f1d8746264 | ||
|
|
baae94b9cf | ||
|
|
3794111460 | ||
|
|
d7ea49b9f5 | ||
|
|
d87a9cb362 | ||
|
|
93b9a2acc0 | ||
|
|
d4a608f64c | ||
|
|
8209bf74f8 | ||
|
|
d88ebd9a4b | ||
|
|
ec8ec58b17 | ||
|
|
a342d58d7e | ||
|
|
d7d167ac63 | ||
|
|
146c8efee3 | ||
|
|
3abc41ccca | ||
|
|
9e3a1bc11a | ||
|
|
cb2da7bf2c | ||
|
|
1aa12c7452 | ||
|
|
fa241efa6d | ||
|
|
ecf3eb4307 | ||
|
|
9ae92459a5 | ||
|
|
5b3f1efd9f | ||
|
|
e0f945959e | ||
|
|
885833892f | ||
|
|
91127d9016 | ||
|
|
1a38f0e0d9 | ||
|
|
fb8beaf19a | ||
|
|
4a8a70dde0 | ||
|
|
8d2a6fc484 | ||
|
|
29ac3980ff | ||
|
|
89bd994c83 | ||
|
|
3e4db7299d | ||
|
|
80dd548b39 | ||
|
|
451f328a4c | ||
|
|
9e4c2afad7 | ||
|
|
2dd4ab65c7 | ||
|
|
b93ae452fe | ||
|
|
c04aea8d9d | ||
|
|
0d7b9065c6 | ||
|
|
452ccff81c | ||
|
|
fb839ca0fb | ||
|
|
b7b7863364 | ||
|
|
3005c4f6db | ||
|
|
963354c5d7 | ||
|
|
17c1bc7383 | ||
|
|
5103f16f78 | ||
|
|
e848b17fab | ||
|
|
3600498c8f | ||
|
|
b2632dec09 | ||
|
|
54930c001d | ||
|
|
41dbb4c148 | ||
|
|
85c9f7c5f3 | ||
|
|
c31606daf9 | ||
|
|
d78abd3561 | ||
|
|
8c71ab5094 | ||
|
|
211dc74816 | ||
|
|
79262173a6 | ||
|
|
7b03b1df0e | ||
|
|
39931f8e00 | ||
|
|
1aa76bd279 | ||
|
|
54c9844d66 | ||
|
|
6705559ce0 | ||
|
|
8e8dfaf227 | ||
|
|
ce7422473a | ||
|
|
fc18741cc7 | ||
|
|
fef09c2de6 | ||
|
|
1e1f9e7166 | ||
|
|
64c68220d2 | ||
|
|
91e5c24a31 | ||
|
|
810ff480b8 | ||
|
|
de65c30770 | ||
|
|
bbf5bcdf99 | ||
|
|
02b53aff0f | ||
|
|
b694cc88e4 | ||
|
|
67c44b7d27 | ||
|
|
263d409326 | ||
|
|
6a79b76531 | ||
|
|
da0fbbadc2 | ||
|
|
1031271224 | ||
|
|
8c70bcee99 | ||
|
|
07c8925805 | ||
|
|
c9e5e38fcf | ||
|
|
29a7d1ce61 | ||
|
|
500b8a2a0f | ||
|
|
ba1270df2d | ||
|
|
ba0feadc34 | ||
|
|
405ee14711 | ||
|
|
1126522a99 | ||
|
|
1601b27ad3 | ||
|
|
f03b6be8f9 | ||
|
|
3ffa17c49a | ||
|
|
98c719c342 | ||
|
|
2a031c1365 | ||
|
|
198567eccb | ||
|
|
f7de6d2b86 | ||
|
|
86eac0842b | ||
|
|
a046a31d2b | ||
|
|
cd084dacf1 | ||
|
|
ac2055e33c | ||
|
|
96f4c9045a | ||
|
|
d95e7065d9 | ||
|
|
5e48c89c5e | ||
|
|
3cfa4a581c | ||
|
|
ce6931a046 | ||
|
|
eb1e6f8e3e | ||
|
|
263fc76b87 | ||
|
|
c1d047d16e | ||
|
|
38f71af363 | ||
|
|
ecdbeea3f5 | ||
|
|
b7b0ee7df9 | ||
|
|
bb05ef907b | ||
|
|
204952439a | ||
|
|
e2e362f2dc | ||
|
|
26a0888bee | ||
|
|
9ce0bd043c | ||
|
|
5e747bc877 | ||
|
|
11af8658cf | ||
|
|
e6e6aaeacb | ||
|
|
e3b78c47e2 | ||
|
|
49193bebd2 | ||
|
|
3598c1435e | ||
|
|
ab59165d2f | ||
|
|
092b59a297 | ||
|
|
7d48f811f1 | ||
|
|
e3a27aeb25 | ||
|
|
dccc50e9d4 | ||
|
|
ad2ab6d214 | ||
|
|
b8368f98ff | ||
|
|
3164354255 | ||
|
|
54724c33ec | ||
|
|
d1911658e1 | ||
|
|
c8b50975bc | ||
|
|
10673417dc | ||
|
|
ad52b2d791 | ||
|
|
09c3c4e70c | ||
|
|
977779cdcf | ||
|
|
71e4689d11 | ||
|
|
f69761563b | ||
|
|
57d48fb6a2 | ||
|
|
7c30ae7002 | ||
|
|
089d934547 | ||
|
|
b0f8b1147c | ||
|
|
25268577a5 | ||
|
|
612fdb98df | ||
|
|
bd55b78775 | ||
|
|
5bbeeb0f1b | ||
|
|
93ee0838eb | ||
|
|
a1109e6fbc | ||
|
|
ebb05475ed | ||
|
|
a11ed51bbb | ||
|
|
e0493259a6 | ||
|
|
b3f0d25ce5 | ||
|
|
d750d53422 | ||
|
|
8d5a4cc9eb | ||
|
|
1476a1a729 | ||
|
|
e3eea745f4 | ||
|
|
60c65415dd | ||
|
|
b92cac7038 | ||
|
|
904f799c1a | ||
|
|
de2a4f8f83 | ||
|
|
135d3733b3 | ||
|
|
3f707b3f32 | ||
|
|
063aacd436 | ||
|
|
196efecaaa | ||
|
|
01e69af2c8 | ||
|
|
25c8d01676 | ||
|
|
7df60af60e | ||
|
|
79ec08141a | ||
|
|
150eef93b2 | ||
|
|
1273b3d3a9 | ||
|
|
b72d7c201a | ||
|
|
4a01bb8fa4 | ||
|
|
d325b23dbb | ||
|
|
976f1486e0 | ||
|
|
cb0ea46d1e | ||
|
|
052ab30409 | ||
|
|
7ba9257a7f | ||
|
|
6a7bd097fe | ||
|
|
0055cbd365 | ||
|
|
4f74b4e657 | ||
|
|
31d763bc1f | ||
|
|
a596388ebf | ||
|
|
8a09256941 | ||
|
|
c03f5a2c7c | ||
|
|
f94d7c3f51 | ||
|
|
061a879cea | ||
|
|
ed84adb679 | ||
|
|
9f015b4c73 | ||
|
|
bc3abb397f | ||
|
|
9e10304ab2 | ||
|
|
ae3639868e | ||
|
|
d082e821a0 | ||
|
|
78bd144c1c | ||
|
|
ebb4f1b78c | ||
|
|
62f21ff3ed | ||
|
|
0d9c41be7d | ||
|
|
c1ceec45da | ||
|
|
b162e565b3 | ||
|
|
6516ecaa51 | ||
|
|
5163d368e3 | ||
|
|
ad041167f7 | ||
|
|
cff3ca23a5 | ||
|
|
41386fa91a | ||
|
|
ea309acdb2 | ||
|
|
0f037b430a | ||
|
|
632b1b694d | ||
|
|
efb68a0a96 | ||
|
|
7027ac9308 | ||
|
|
b9560374cd | ||
|
|
a5926f2689 | ||
|
|
f1304bde34 | ||
|
|
3549fb0ea8 | ||
|
|
a2cac952a4 | ||
|
|
bba401a5dc | ||
|
|
1b7adf57e9 | ||
|
|
cfed11f092 | ||
|
|
f67c59135f | ||
|
|
fdc8c34258 | ||
|
|
18a80b291b | ||
|
|
52d15ddec8 | ||
|
|
2a3660dae3 | ||
|
|
09ca5d125a | ||
|
|
27cb01cd5f | ||
|
|
7fe61558f6 | ||
|
|
33659ed9a5 | ||
|
|
e004ec08e9 | ||
|
|
132590fab8 | ||
|
|
e21d8a7d35 | ||
|
|
d84d6dfdae | ||
|
|
b92384020c | ||
|
|
d89e630bc0 | ||
|
|
59a7c7c5a5 | ||
|
|
25d6ae69d1 | ||
|
|
f8977f4847 | ||
|
|
e79e4b1580 | ||
|
|
40bc130b19 | ||
|
|
0ddb1eb769 | ||
|
|
ab7206d6b7 | ||
|
|
f7be61c819 | ||
|
|
85c35a6b8b | ||
|
|
7269b06fd5 | ||
|
|
8d2fe064c5 | ||
|
|
6498fce04b | ||
|
|
033a7f0224 | ||
|
|
31d8011843 | ||
|
|
d8290c9bac | ||
|
|
bdfdf3cacb | ||
|
|
8db8771be7 | ||
|
|
9fc4ded369 | ||
|
|
881ee6a4df | ||
|
|
aee46bac01 | ||
|
|
714de0a3af | ||
|
|
863a4d5bc4 | ||
|
|
f36f9e07b7 | ||
|
|
7df0794e14 | ||
|
|
000b906259 | ||
|
|
87b442433c | ||
|
|
097f1b5759 | ||
|
|
dcb10a41d4 | ||
|
|
2a7a03e5b3 | ||
|
|
05a33107c9 | ||
|
|
8b0e815d98 | ||
|
|
f19fc230d4 | ||
|
|
9476e58de9 | ||
|
|
9ddd545473 | ||
|
|
0730ec4087 | ||
|
|
8826186c30 | ||
|
|
565974f8f7 | ||
|
|
399887cc0e | ||
|
|
fd5ea4b79e | ||
|
|
830efc90da | ||
|
|
8e0aeb4ad5 | ||
|
|
c80f0232f1 | ||
|
|
1240fef0ca | ||
|
|
85f375433d | ||
|
|
af0741da07 | ||
|
|
00a864e693 | ||
|
|
d55c5b9e28 | ||
|
|
bc67c34bea | ||
|
|
d1a2228f1c | ||
|
|
7b310b1abb | ||
|
|
2886eb76b6 | ||
|
|
1858d2066b | ||
|
|
3e740278bd | ||
|
|
9611f29966 | ||
|
|
c5ce33047e | ||
|
|
da8dba53a7 | ||
|
|
bf5595f9a0 | ||
|
|
1ed67798ac | ||
|
|
36661f53e6 | ||
|
|
801fc536f2 | ||
|
|
99e009665c | ||
|
|
72ec3e8da0 | ||
|
|
2bce24068d | ||
|
|
9554ad514e | ||
|
|
df3621e050 | ||
|
|
5e6091a30a | ||
|
|
80447f1168 | ||
|
|
bc1a578914 | ||
|
|
cc9a84b83a | ||
|
|
c30063eefb | ||
|
|
ae2f4866d0 | ||
|
|
676bd764fa | ||
|
|
1bbf4c9768 | ||
|
|
7e36bf448d | ||
|
|
d78008b546 | ||
|
|
1d6df04ecb | ||
|
|
084dce53ac | ||
|
|
5cdecd74c7 | ||
|
|
85e01bfe01 | ||
|
|
73ddf401ee | ||
|
|
4c8ef90157 | ||
|
|
69e332f432 | ||
|
|
9bc63bda7d | ||
|
|
66d51804c9 | ||
|
|
444032664b | ||
|
|
272d387c0c | ||
|
|
32760ba49d | ||
|
|
08dbf08d39 | ||
|
|
d2aff9a46a | ||
|
|
56b735f67b | ||
|
|
904bf1a50b | ||
|
|
8829174574 | ||
|
|
6558990e3a | ||
|
|
a6ec6def8d | ||
|
|
c40e815763 | ||
|
|
c4a33892d3 | ||
|
|
1aec1a2dda | ||
|
|
81287ba022 | ||
|
|
9baf2b38d0 | ||
|
|
50de06056b | ||
|
|
74b31566cf | ||
|
|
66c9c86219 | ||
|
|
ce55807542 | ||
|
|
510d5a5d74 | ||
|
|
cd0ddcfa01 | ||
|
|
3d79f59671 | ||
|
|
b40922f4d4 | ||
|
|
12639c577f | ||
|
|
95a594d75a | ||
|
|
f2c263c54f | ||
|
|
21a1b8e5a3 | ||
|
|
03c6a395aa | ||
|
|
1661421a65 | ||
|
|
e325c8499a | ||
|
|
97a373f5e7 | ||
|
|
b765229a6d | ||
|
|
e0a2d23baf | ||
|
|
fa60502a70 | ||
|
|
97fb62f51e | ||
|
|
a60edbe88c | ||
|
|
bba707de36 | ||
|
|
78add502d7 | ||
|
|
36b4c57ff1 | ||
|
|
3e32b14ad4 | ||
|
|
202a29a475 | ||
|
|
352d8943e4 | ||
|
|
ccc20f7c70 | ||
|
|
5fbf27bb07 | ||
|
|
d0dd90958a | ||
|
|
ba8b6f5d78 | ||
|
|
872cd0d3bd | ||
|
|
5acc948562 | ||
|
|
2935ee440c | ||
|
|
371372d65d | ||
|
|
5fbf8531e6 | ||
|
|
7af7584d25 | ||
|
|
5605af973b | ||
|
|
78defd238c | ||
|
|
08c6d07aad | ||
|
|
9a1d5d2489 | ||
|
|
9820b8e134 | ||
|
|
7c7014262b | ||
|
|
57f6ec672a | ||
|
|
9d5c0c80a4 | ||
|
|
e527c9b330 | ||
|
|
e8c9bb2c66 | ||
|
|
0bfbefc38a | ||
|
|
51abaf788c | ||
|
|
be7ce72ebe | ||
|
|
99eeb08419 | ||
|
|
a8e05fdf1b | ||
|
|
6fc2107529 | ||
|
|
fa0a389dc4 | ||
|
|
6f6fda1481 | ||
|
|
5f84e8f4ff | ||
|
|
2cb754b5af | ||
|
|
8023494a94 | ||
|
|
755eec745f | ||
|
|
669552e255 | ||
|
|
17d2675dd2 | ||
|
|
b95e78f7e6 | ||
|
|
568c9b353e | ||
|
|
dabf5b057c | ||
|
|
7bbf644dd5 | ||
|
|
3428baa3b5 | ||
|
|
78672b9227 | ||
|
|
8453ffb7ed | ||
|
|
645c194a00 | ||
|
|
d4cbbc864a | ||
|
|
b1185e121f | ||
|
|
febaddfd1d | ||
|
|
9813161411 | ||
|
|
5e81383413 | ||
|
|
02a81ddb62 | ||
|
|
27a51f5bcc | ||
|
|
91480f3791 | ||
|
|
7de3dd01de | ||
|
|
35c75f06a0 | ||
|
|
545d320648 | ||
|
|
5c4bc3c848 | ||
|
|
3f38ff6c09 | ||
|
|
8dd07c0ddd | ||
|
|
76f7ad45e6 | ||
|
|
872590d8b5 | ||
|
|
7921e60f30 | ||
|
|
0db84e4f63 | ||
|
|
0a739cf9ac | ||
|
|
3e23241f58 | ||
|
|
6407caa761 | ||
|
|
ef8eef7519 | ||
|
|
71cefc95ab | ||
|
|
957361d755 | ||
|
|
cd369b667f | ||
|
|
ef430ae7ab | ||
|
|
a447aecd95 | ||
|
|
aea2b54c99 | ||
|
|
cf3021ecca | ||
|
|
c084a5ba73 | ||
|
|
5ed5912ef5 | ||
|
|
09cb8c67cb | ||
|
|
a03a1e87e9 | ||
|
|
aad91d4b21 | ||
|
|
f0da8a68c2 | ||
|
|
12fb42de5a | ||
|
|
4e2477a1a5 | ||
|
|
f7617997ce | ||
|
|
204ef41b09 | ||
|
|
dedb156d4a | ||
|
|
30d7397f97 | ||
|
|
0f3414ec39 | ||
|
|
2032080d86 | ||
|
|
8ccde45c5f | ||
|
|
eafa365453 | ||
|
|
ad7beb78d0 | ||
|
|
835e85b5ce | ||
|
|
c4eeb803e1 | ||
|
|
3e7e9ee289 | ||
|
|
87855d42a0 | ||
|
|
620c0ef297 | ||
|
|
cbcd08aa17 | ||
|
|
c20f5dc2ea | ||
|
|
a41a1fe60d | ||
|
|
da0240aacd | ||
|
|
9a7349ce64 | ||
|
|
4d702eb345 | ||
|
|
9df99681fb | ||
|
|
bfe5b86004 | ||
|
|
3db84c8893 | ||
|
|
70b0023b82 | ||
|
|
43e5de7f83 | ||
|
|
fa1db64ff0 | ||
|
|
ef1cbcd761 | ||
|
|
1129f756c8 | ||
|
|
967856f36e | ||
|
|
a76a948a02 | ||
|
|
d43c5895bc | ||
|
|
3c025b3950 | ||
|
|
34304e6a0c | ||
|
|
4617bef895 | ||
|
|
c850c01007 | ||
|
|
469cbc8813 | ||
|
|
6e9f1c52b1 | ||
|
|
812f71e21b | ||
|
|
94b100ce43 | ||
|
|
40557a4f79 | ||
|
|
8e4debe99d | ||
|
|
dc2e140360 | ||
|
|
5bbd5be0ca | ||
|
|
0d06c7e5f2 | ||
|
|
636a78fed1 | ||
|
|
e194cf3291 | ||
|
|
ed73af6fa1 | ||
|
|
267870537d | ||
|
|
ccca60a5a1 | ||
|
|
ec26b78d3c | ||
|
|
18718afb36 | ||
|
|
0b4fcf1224 | ||
|
|
dcb252eff4 | ||
|
|
78103f1df3 | ||
|
|
536f65b8ad | ||
|
|
887ad1ec8b | ||
|
|
aab2dbc505 | ||
|
|
5a97cc69ed | ||
|
|
6418caf23a | ||
|
|
9a3e1790a1 | ||
|
|
3969d704a0 | ||
|
|
0f907301b7 | ||
|
|
590f9e599c | ||
|
|
63e47405b2 | ||
|
|
c127d84777 | ||
|
|
63cc14062a | ||
|
|
7ffdabb28f | ||
|
|
9b014d05e4 | ||
|
|
097c8e05e6 | ||
|
|
21088a40f5 | ||
|
|
10f932b952 | ||
|
|
fd5412ec47 | ||
|
|
baa255e899 | ||
|
|
3c6da63216 | ||
|
|
aed4271c8d | ||
|
|
be8ac7fb75 | ||
|
|
7f3015b32b | ||
|
|
13b032f829 | ||
|
|
ae7f3eed78 | ||
|
|
a481672c5c | ||
|
|
0820b24f0b | ||
|
|
36292060d6 | ||
|
|
cdffdeddc9 | ||
|
|
465dc962b5 | ||
|
|
3f42cb7c23 | ||
|
|
3ad20773a2 | ||
|
|
e57aebb316 | ||
|
|
269da8fe7a | ||
|
|
e4ea5cf598 | ||
|
|
be123588ce | ||
|
|
99713e1180 | ||
|
|
5dbfe3c26c | ||
|
|
1c46d68aba | ||
|
|
4ce2fa520a | ||
|
|
a357cda957 | ||
|
|
54e17c7cca | ||
|
|
86e2627175 | ||
|
|
e5ae41e21f | ||
|
|
6e448b0714 | ||
|
|
ee9b7f322f | ||
|
|
57ac15aa20 | ||
|
|
7dbeee94e3 | ||
|
|
1d55ecd29c | ||
|
|
b5ba2bd268 | ||
|
|
19e9104289 | ||
|
|
165e3e8f18 | ||
|
|
32b09681b2 | ||
|
|
8644c571db | ||
|
|
43b33440b5 | ||
|
|
72ba273cc9 | ||
|
|
4cf7a1fca5 | ||
|
|
80be060735 | ||
|
|
8e6c254c03 | ||
|
|
3624b2a7f1 | ||
|
|
e0f9c628c5 | ||
|
|
cc703ee663 | ||
|
|
b2801a2e98 | ||
|
|
ceb415df8a | ||
|
|
63770d93a1 | ||
|
|
9bdff5bd97 | ||
|
|
d5d04a66f3 | ||
|
|
29a40c97f3 | ||
|
|
98f614a58e | ||
|
|
47d29a1ee0 | ||
|
|
fb53cc4fa8 | ||
|
|
f393dc6520 | ||
|
|
ea507e20d4 | ||
|
|
314193029a | ||
|
|
9c82073091 | ||
|
|
9924e65ca1 | ||
|
|
adda10f4a4 | ||
|
|
514d7e1922 | ||
|
|
bf703ef617 | ||
|
|
c280415e0b | ||
|
|
9d2cef23f2 | ||
|
|
ad5ec45dd6 | ||
|
|
8bfa7ae745 | ||
|
|
6c8d630bef | ||
|
|
f147ad619a | ||
|
|
8d3276cab0 | ||
|
|
d952b4200c | ||
|
|
e07674bff1 | ||
|
|
fb0972afad | ||
|
|
9961f9a53c | ||
|
|
1161c71ac1 | ||
|
|
c018b1a88d | ||
|
|
29561acb43 | ||
|
|
2da9908e29 | ||
|
|
a13a6b14ec | ||
|
|
a3e1383cac | ||
|
|
f160b4f33c | ||
|
|
1f58d6f5d9 | ||
|
|
a80d8d96fa | ||
|
|
302c863cda | ||
|
|
4fcbf553aa | ||
|
|
a0318db2f9 | ||
|
|
c6058e5ea8 | ||
|
|
4f2f3c2857 | ||
|
|
925ccc2608 | ||
|
|
11f9d738e8 | ||
|
|
63baf76ab2 | ||
|
|
9c3aa6936a | ||
|
|
32c5fa514c | ||
|
|
eaa7d71fc7 | ||
|
|
e1332c5239 | ||
|
|
afc6cbc479 | ||
|
|
1f059502dc | ||
|
|
01a516b584 | ||
|
|
48c98c92c8 | ||
|
|
6fe43eb8d4 | ||
|
|
2657f88d9a | ||
|
|
ddb7f55035 | ||
|
|
fbf274b751 | ||
|
|
422043f422 | ||
|
|
617bbe3fee | ||
|
|
9085dfa426 | ||
|
|
6696610aea | ||
|
|
e323604d78 | ||
|
|
4ee6bc4fca | ||
|
|
ab13a29cb5 | ||
|
|
ff690fd976 | ||
|
|
bcfa78b8b5 | ||
|
|
6227b59b1a | ||
|
|
e0a6e6dd1a | ||
|
|
bf5fcfb49c | ||
|
|
ff48aeddef | ||
|
|
d72fdc9900 | ||
|
|
5543a0b6dc | ||
|
|
2f820e01d8 | ||
|
|
688ec6ecbd | ||
|
|
87854c95a9 | ||
|
|
80055bde86 | ||
|
|
e33a104448 | ||
|
|
dce17c86ac | ||
|
|
b1bdbd7f94 | ||
|
|
50ba08e2c6 | ||
|
|
5e9a45f74a | ||
|
|
1331134316 | ||
|
|
4e8a1bf9c9 | ||
|
|
c82807a713 | ||
|
|
342baf1dda | ||
|
|
fdc6b64f15 | ||
|
|
02fb088b80 | ||
|
|
5660570d92 | ||
|
|
93f8f92523 | ||
|
|
a4c3ab48a5 | ||
|
|
7fd22bea1e | ||
|
|
04890904f9 | ||
|
|
a0a95d797e | ||
|
|
956f011dd3 | ||
|
|
16e162b669 | ||
|
|
61641d9c63 | ||
|
|
44f1ef2493 | ||
|
|
be82716b66 | ||
|
|
57ad8d50b7 | ||
|
|
f6c94c29d5 | ||
|
|
4744996f9a | ||
|
|
db6b71ad03 | ||
|
|
f4486f3eec | ||
|
|
4f042d12bd | ||
|
|
7869cfccb9 | ||
|
|
eb264a112b | ||
|
|
839a9bb054 | ||
|
|
9d5e827a1e | ||
|
|
b70db61854 | ||
|
|
16bddd593a | ||
|
|
e880a2fa48 | ||
|
|
46fc36c3a6 | ||
|
|
a1bb3741d5 | ||
|
|
99f2400e3b | ||
|
|
4a4392192b | ||
|
|
e8dd480f10 | ||
|
|
9100786beb | ||
|
|
b0084b1adc | ||
|
|
5ed5aa5228 | ||
|
|
33ec0632ff | ||
|
|
f276b37bbb | ||
|
|
cca2a53d6f | ||
|
|
5d5c4535cb | ||
|
|
2eee1e9bc2 | ||
|
|
98dbbae2ef | ||
|
|
c117f9e73f | ||
|
|
f979d0d6b9 | ||
|
|
a913aff1d0 | ||
|
|
54e95fa367 | ||
|
|
f1130ce5e9 | ||
|
|
f5b2e5f836 | ||
|
|
1769bb2f26 | ||
|
|
83a10ce880 | ||
|
|
7ec3f1b2d8 | ||
|
|
3fe87cba85 | ||
|
|
ca0b6dfa38 | ||
|
|
1482bd8fb4 | ||
|
|
0970d6cc38 | ||
|
|
98eeec4cbb | ||
|
|
68fb62347f | ||
|
|
a196245a87 | ||
|
|
605a38759f | ||
|
|
fd4b123e88 | ||
|
|
d122aa6d88 | ||
|
|
2c73ced0db | ||
|
|
fd7b0a2ba4 | ||
|
|
27f9b7a144 | ||
|
|
f68e279150 | ||
|
|
70398ed01a | ||
|
|
d2231bb54c | ||
|
|
65e628d1f4 | ||
|
|
c5dbc24ca4 | ||
|
|
bf58679390 | ||
|
|
cdc87623dc | ||
|
|
b33f255c40 | ||
|
|
26c0113ea0 | ||
|
|
55019bfbc5 | ||
|
|
4d6de6c7b9 | ||
|
|
7d84cc96e8 | ||
|
|
2eabeba6b7 | ||
|
|
045c21de4f | ||
|
|
4ef9494637 | ||
|
|
43ffacd05b | ||
|
|
501f70e248 | ||
|
|
09dba7d63e | ||
|
|
3f4c040f3f | ||
|
|
830494a8aa | ||
|
|
25713ab209 | ||
|
|
914ffa496f | ||
|
|
a742ee543e | ||
|
|
e867283406 | ||
|
|
a03f380fa8 | ||
|
|
8eb15815f1 | ||
|
|
11ca10ab2f | ||
|
|
23a857d107 | ||
|
|
495d939ca5 | ||
|
|
7d89e765ab | ||
|
|
31fd45ba02 | ||
|
|
abd8c2a7ca | ||
|
|
e05b1385fb | ||
|
|
8b6766ecbe | ||
|
|
269281ab76 | ||
|
|
4b08d3aacf | ||
|
|
33d32585b1 | ||
|
|
6fb7229bea | ||
|
|
7407f9caf3 | ||
|
|
d76772adb9 | ||
|
|
8ca14e2109 | ||
|
|
7cb5a15c9b | ||
|
|
e573855a4f | ||
|
|
94bccbb148 | ||
|
|
24f614f6db | ||
|
|
cb505b22ec | ||
|
|
6e3dba2cc5 | ||
|
|
bbdfe25769 | ||
|
|
c1eb4d894a | ||
|
|
5f653898f3 | ||
|
|
d189b83ac1 | ||
|
|
d34c3bb751 | ||
|
|
3b7465f817 | ||
|
|
d8136c9c3c | ||
|
|
1652dd5068 | ||
|
|
02687cbdf3 | ||
|
|
07c3d497a7 | ||
|
|
816c0ed5e7 | ||
|
|
a641854cad | ||
|
|
bb0bc0a240 | ||
|
|
7b60756f2c | ||
|
|
163fcec59f | ||
|
|
79ea34e70e | ||
|
|
e10096ee2e | ||
|
|
a9e6d49dc6 | ||
|
|
3e856928a2 | ||
|
|
8bbaf9550a | ||
|
|
e7d8fadb08 | ||
|
|
3bd5fc6d6f | ||
|
|
cd2020429a | ||
|
|
ff9872104e | ||
|
|
a3f807106a | ||
|
|
100cd181bc | ||
|
|
03c2468c2f | ||
|
|
fa17989763 | ||
|
|
75109bbd65 | ||
|
|
6ce8fa49ea | ||
|
|
0a187dbef5 | ||
|
|
f6c4fbeb37 | ||
|
|
ad71775ae8 | ||
|
|
0dfb5560cd | ||
|
|
1c88a541cb | ||
|
|
a7584d16e4 | ||
|
|
480a4ae8c5 | ||
|
|
cc1eb5643e | ||
|
|
a2333d95d5 | ||
|
|
89c99167b2 | ||
|
|
d0ea4c7b68 | ||
|
|
2a1dc0085b | ||
|
|
46af92c57e | ||
|
|
52fbb9788a | ||
|
|
00ebb5019f | ||
|
|
dc5546633f | ||
|
|
eb463000a9 | ||
|
|
49dc57e336 | ||
|
|
de46c06d2e | ||
|
|
b36448a537 | ||
|
|
48bfbb7ddf | ||
|
|
1e9f376d3d | ||
|
|
a85f242030 | ||
|
|
cdc843f06b | ||
|
|
0d6856dbe7 | ||
|
|
494e5fd40c | ||
|
|
8bab21d795 |
20
.bra.toml
Normal file
20
.bra.toml
Normal file
@@ -0,0 +1,20 @@
|
||||
[run]
|
||||
init_cmds = [
|
||||
["grep", "-rn", "FIXME", "."],
|
||||
["./gogs", "web"]
|
||||
]
|
||||
watch_all = true
|
||||
watch_dirs = [
|
||||
"$WORKDIR/conf/locale",
|
||||
"$WORKDIR/cmd",
|
||||
"$WORKDIR/models",
|
||||
"$WORKDIR/modules",
|
||||
"$WORKDIR/routers"
|
||||
]
|
||||
watch_exts = [".go", ".ini"]
|
||||
build_delay = 1500
|
||||
cmds = [
|
||||
["go", "install", "-tags", "sqlite cert"],# redis memcache
|
||||
["go", "build", "-tags", "sqlite cert"],
|
||||
["./gogs", "web"]
|
||||
]
|
||||
@@ -1,12 +0,0 @@
|
||||
{
|
||||
"paths": ["."],
|
||||
"depth": 2,
|
||||
"exclude": [],
|
||||
"include": ["\\.go$", "\\.ini$"],
|
||||
"command": [
|
||||
"bash", "-c", "go build && ./gogs web"
|
||||
],
|
||||
"env": {
|
||||
"POWERED_BY": "github.com/shxsun/fswatch"
|
||||
}
|
||||
}
|
||||
22
.gitignore
vendored
22
.gitignore
vendored
@@ -7,31 +7,31 @@ data/
|
||||
.idea/
|
||||
*.iml
|
||||
public/img/avatar/
|
||||
|
||||
# Compiled Object files, Static and Dynamic libs (Shared Objects)
|
||||
files/
|
||||
*.o
|
||||
*.a
|
||||
*.so
|
||||
dev
|
||||
|
||||
# Folders
|
||||
_obj
|
||||
_test
|
||||
|
||||
# Architecture specific extensions/prefixes
|
||||
*.[568vq]
|
||||
[568vq].out
|
||||
|
||||
*.cgo1.go
|
||||
*.cgo2.c
|
||||
_cgo_defun.c
|
||||
_cgo_gotypes.go
|
||||
_cgo_export.*
|
||||
|
||||
_testmain.go
|
||||
|
||||
*.exe
|
||||
*.exe~
|
||||
gogs
|
||||
/gogs
|
||||
profile/
|
||||
__pycache__
|
||||
*.pem
|
||||
output*
|
||||
config.codekit
|
||||
.brackets.json
|
||||
docker/fig.yml
|
||||
docker/docker/Dockerfile
|
||||
docker/docker/init_gogs.sh
|
||||
gogs.sublime-project
|
||||
gogs.sublime-workspace
|
||||
20
.gobuild.yml
20
.gobuild.yml
@@ -1,10 +1,22 @@
|
||||
filesets:
|
||||
includes:
|
||||
- templates
|
||||
- public
|
||||
- conf
|
||||
- etc
|
||||
- public
|
||||
- scripts
|
||||
- templates
|
||||
- LICENSE
|
||||
- README.md
|
||||
- README_ZH.md
|
||||
- start.bat
|
||||
- start.sh
|
||||
excludes:
|
||||
- \.git
|
||||
depth: 5
|
||||
settings:
|
||||
build: |
|
||||
if test "$GOOS" = "windows" -a "$GOARCH" = "386"
|
||||
then
|
||||
go install -v
|
||||
else
|
||||
go get -v -tags "sqlite redis memcache cert" github.com/gogits/gogs
|
||||
go install -v -tags "sqlite redis memcache cert"
|
||||
fi
|
||||
|
||||
46
.gopmfile
46
.gopmfile
@@ -2,25 +2,33 @@
|
||||
path = github.com/gogits/gogs
|
||||
|
||||
[deps]
|
||||
github.com/Unknwon/cae =
|
||||
github.com/Unknwon/com =
|
||||
github.com/Unknwon/goconfig =
|
||||
github.com/codegangsta/cli =
|
||||
github.com/go-martini/martini =
|
||||
github.com/go-sql-driver/mysql =
|
||||
github.com/go-xorm/xorm =
|
||||
github.com/gogits/cache =
|
||||
github.com/gogits/gfm =
|
||||
github.com/gogits/git =
|
||||
github.com/gogits/logs =
|
||||
github.com/gogits/oauth2 =
|
||||
github.com/gogits/session =
|
||||
github.com/lib/pq =
|
||||
github.com/nfnt/resize =
|
||||
github.com/qiniu/log =
|
||||
github.com/robfig/cron =
|
||||
github.com/juju2013/goldap =
|
||||
github.com/beego/memcache = commit:2aea774416
|
||||
github.com/beego/redigo = commit:856744a0d5
|
||||
github.com/Unknwon/cae = commit:2e70a1351b
|
||||
github.com/Unknwon/com = commit:2cbcbc6916
|
||||
github.com/Unknwon/goconfig = commit:0f8d8dc1c0
|
||||
github.com/Unknwon/i18n = commit:aec5f77857
|
||||
github.com/Unknwon/macaron = commit:3d307c1232
|
||||
github.com/codegangsta/cli = commit:7381bc4e62
|
||||
github.com/go-sql-driver/mysql = commit:8111ee3ec3
|
||||
github.com/go-xorm/core = commit:3e0fa232ab
|
||||
github.com/go-xorm/xorm = commit:58d33844ce
|
||||
github.com/gogits/go-gogs-client = commit:92e76d616a
|
||||
github.com/gogits/oauth2 = commit:99cbec870a
|
||||
github.com/lib/pq = commit:b021d0ef20
|
||||
github.com/macaron-contrib/binding = commit:0e23661e7d
|
||||
github.com/macaron-contrib/cache = commit:0bb9e6c9ef
|
||||
github.com/macaron-contrib/captcha = commit:3567dc48b8
|
||||
github.com/macaron-contrib/csrf = commit:422b79675c
|
||||
github.com/macaron-contrib/i18n = commit:184bb832f2
|
||||
github.com/macaron-contrib/oauth2 = commit:8f394c3629
|
||||
github.com/macaron-contrib/session = commit:f00d48fd4f
|
||||
github.com/macaron-contrib/toolbox = commit:57127bcc89
|
||||
github.com/mattn/go-sqlite3 = commit:a80c27ba33
|
||||
github.com/nfnt/resize = commit:581d15cb53
|
||||
github.com/russross/blackfriday = commit:05b8cefd6a
|
||||
github.com/saintfish/chardet = commit:3af4cd4741
|
||||
|
||||
[res]
|
||||
include = templates|public|conf
|
||||
include = conf|etc|public|scripts|templates
|
||||
|
||||
|
||||
13
.pkgr.yml
Normal file
13
.pkgr.yml
Normal file
@@ -0,0 +1,13 @@
|
||||
targets:
|
||||
ubuntu-14.04:
|
||||
ubuntu-12.04:
|
||||
debian-7:
|
||||
centos-6:
|
||||
dependencies:
|
||||
- git
|
||||
before:
|
||||
- mv packager/Procfile .
|
||||
- mv packager/.godir .
|
||||
after:
|
||||
- mv bin/main gogs
|
||||
after_install: ./packager/debian/postinst
|
||||
5
.travis.yml
Normal file
5
.travis.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
language: go
|
||||
|
||||
go:
|
||||
- 1.2
|
||||
- 1.3
|
||||
@@ -1,16 +1,54 @@
|
||||
# Contributing to Gogs
|
||||
|
||||
> Thanks [drone](https://github.com/drone/drone) because this guidelines sheet is forked from its [CONTRIBUTING.md](https://github.com/drone/drone/blob/master/CONTRIBUTING.md).
|
||||
> This guidelines sheet is forked from [CONTRIBUTING.md](https://github.com/drone/drone/blob/master/CONTRIBUTING.md).
|
||||
|
||||
**This document is pre^2 release, we're not ready for receiving contribution until v0.5.0 release.**
|
||||
|
||||
Want to hack on Gogs? Awesome! Here are instructions to get you started. They are probably not perfect, please let us know if anything feels wrong or incomplete.
|
||||
Gogs is not perfect and it has bugs, or incomplete features for rare cases. You're welcome to tell us or contribute some code. This document describles details about how can you contribute to Gogs project.
|
||||
|
||||
## Contribution guidelines
|
||||
|
||||
### Pull requests are always welcome
|
||||
Depends on the situation, you will:
|
||||
|
||||
**ALL PULL REQUESTS MUST SEND TO `DEV` BRANCH**
|
||||
- Find bug, create an issue
|
||||
- Need more functionality, make a feature request
|
||||
- Want to contribute code, open a pull request
|
||||
- Run into issue, need help
|
||||
|
||||
### Bug Report
|
||||
|
||||
If you find or consider something is a bug, please create a issue on [GitHub](https://github.com/gogits/gogs/issues). To reduce unnecessary time wasting of interacting and waiting with team members, please use following form as template in the first place:
|
||||
|
||||
```
|
||||
- **Bug Description**:
|
||||
- **Gogs Version**:
|
||||
- **Git Version**:
|
||||
- **System Type**:
|
||||
- **Error Log**:
|
||||
- **Other information**:
|
||||
```
|
||||
|
||||
Please take a moment to check that an issue on [GitHub](https://github.com/gogits/gogs/issues) doesn't already exist documenting your bug report or improvement proposal. If it does, it never hurts to add a quick "+1" or "I have this problem too". This will help prioritize the most common problems and requests.
|
||||
|
||||
#### Bug Report Example
|
||||
|
||||
- **Bug Description**: Crash when create repository with license|
|
||||
- **Gogs Version**: `v0.4.9.0901`
|
||||
- **Git Version**: `1.9.0`
|
||||
- **System Type**: `Ubuntu 12.04`
|
||||
- **Error Log**:
|
||||
|
||||
```
|
||||
2014/09/01 07:21:49 [E] nil pointer
|
||||
```
|
||||
|
||||
- **Other information**: Use SQLite3 as database
|
||||
|
||||
### Feature Request
|
||||
|
||||
There is no standard form of making a feature request, just try to describle the feature as clear as possible because team members may not have experience with the functionality you're talking about.
|
||||
|
||||
### Pull Request
|
||||
|
||||
Pull requests are always welcome, but note that **ALL PULL REQUESTS MUST SEND TO `DEV` BRANCH**.
|
||||
|
||||
We are always thrilled to receive pull requests, and do our best to process them as fast as possible. Not sure if that typo is worth a pull request? Do it! We will appreciate it.
|
||||
|
||||
@@ -18,16 +56,16 @@ If your pull request is not accepted on the first try, don't be discouraged! If
|
||||
|
||||
We're trying very hard to keep Gogs lean and focused. We don't want it to do everything for everybody. This means that we might decide against incorporating a new feature.
|
||||
|
||||
### Ask For Help
|
||||
|
||||
Before open any new issue, please check your problem on [Troubleshooting](http://gogs.io/docs/intro/troubleshooting.md) and [FAQs](http://gogs.io/docs/intro/faqs.html) pages.
|
||||
|
||||
## Things To Notice
|
||||
|
||||
Please take a moment to check that an issue on [GitHub](https://github.com/gogits/gogs/issues) or card on [Trello](https://trello.com/b/uxAoeLUl/gogs-go-git-service) doesn't already exist documenting your bug report or improvement proposal. If it does, it never hurts to add a quick "+1" or "I have this problem too". This will help prioritize the most common problems and requests.
|
||||
|
||||
### Discuss your design on the mailing list
|
||||
|
||||
We recommend discussing your plans [on the mailing list](https://groups.google.com/forum/#!forum/gogits) before starting to code - especially for more ambitious contributions. This gives other contributors a chance to point you in the right direction, give feedback on your design, and maybe point out if someone else is working on the same thing.
|
||||
|
||||
We may close your pull request if not first discussed on the mailing list. We aren't doing this to be jerks. We are doing this to prevent people from spending large amounts of time on changes that may need to be designed or architected in a specific way, or may not align with the vision of the project.
|
||||
|
||||
### Create issues...
|
||||
|
||||
Any significant improvement should be documented as [a GitHub issue](https://github.com/gogits/gogs/issues) before anybody starts working on it.
|
||||
|
||||
### ...but check for existing issues first!
|
||||
|
||||
Please take a moment to check that an issue doesn't already exist documenting your bug report or improvement proposal. If it does, it never hurts to add a quick "+1" or "I have this problem too". This will help prioritize the most common problems and requests.
|
||||
We may close your pull request if not first discussed on the mailing list. We aren't doing this to be jerks. We are doing this to prevent people from spending large amounts of time on changes that may need to be designed or architected in a specific way, or may not align with the vision of the project.
|
||||
40
LICENSE
40
LICENSE
@@ -1,27 +1,19 @@
|
||||
Copyright (c) 2014
|
||||
All rights reserved.
|
||||
Copyright (c) 2014 All Gogs Contributors
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
* Neither the name of the {organization} nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
76
README.md
76
README.md
@@ -1,16 +1,16 @@
|
||||
Gogs - Go Git Service [](https://app.wercker.com/project/bykey/ad0bdb0bc450ac6f09bc56b9640a50aa) [](https://drone.io/github.com/gogits/gogs/latest)
|
||||
Gogs - Go Git Service [](https://app.wercker.com/project/bykey/ad0bdb0bc450ac6f09bc56b9640a50aa) [](https://travis-ci.org/gogits/gogs)
|
||||
=====================
|
||||
|
||||
Gogs(Go Git Service) is a Self Hosted Git Service in the Go Programming Language.
|
||||
Gogs(Go Git Service) is a painless self-hosted Git Service written in Go.
|
||||
|
||||

|
||||

|
||||
|
||||
##### Current version: 0.3.1 Alpha
|
||||
##### Current version: 0.5.8 Beta
|
||||
|
||||
### NOTICES
|
||||
|
||||
- Due to testing purpose, data of [try.gogits.org](http://try.gogits.org) has been reset in **April 14, 2014** and will reset multiple times after. Please do **NOT** put your important data on the site.
|
||||
- Demo site [try.gogits.org](http://try.gogits.org) is running under `dev` branch.
|
||||
- Due to testing purpose, data of [try.gogs.io](https://try.gogs.io) has been reset in **June 21, 2014** and will reset multiple times after. Please do **NOT** put your important data on the site.
|
||||
- Demo site [try.gogs.io](https://try.gogs.io) is running under `dev` branch.
|
||||
|
||||
#### Other language version
|
||||
|
||||
@@ -18,29 +18,37 @@ Gogs(Go Git Service) is a Self Hosted Git Service in the Go Programming Language
|
||||
|
||||
## Purpose
|
||||
|
||||
Since we choose to use pure Go implementation of Git manipulation, Gogs certainly supports **ALL platforms** that Go supports, including Linux, Mac OS X, and Windows with **ZERO** dependency.
|
||||
|
||||
More importantly, Gogs only needs one binary to setup your own project hosting on the fly!
|
||||
The goal of this project is to make the easiest, fastest and most painless way to set up a self-hosted Git service. With Go, this can be done in independent binary distribution across **ALL platforms** that Go supports, including Linux, Mac OS X, and Windows.
|
||||
|
||||
## Overview
|
||||
|
||||
- Please see [Wiki](https://github.com/gogits/gogs/wiki) for project design, known issues, and change log.
|
||||
- Please see [Documentation](http://gogs.io/docs/intro/) for project design, known issues, and change log.
|
||||
- See [Trello Board](https://trello.com/b/uxAoeLUl/gogs-go-git-service) to follow the develop team.
|
||||
- Try it before anything? Do it [online](http://try.gogits.org/Unknown/gogs) or go down to **Installation -> Install from binary** section!
|
||||
- Having troubles? Get help from [Troubleshooting](https://github.com/gogits/gogs/wiki/Troubleshooting).
|
||||
- Try it before anything? Do it [online](https://try.gogs.io/Unknown/gogs) or go down to **Installation -> Install from binary** section!
|
||||
- Having troubles? Get help from [Troubleshooting](http://gogs.io/docs/intro/troubleshooting.md).
|
||||
- Want to help on localization? Check out [Crowdin](https://crowdin.com/project/gogs)!
|
||||
|
||||
## Features
|
||||
|
||||
- Activity timeline
|
||||
- SSH/HTTP(S) protocol support.
|
||||
- Register/delete/rename account.
|
||||
- Create/migrate/mirror/delete/watch/rename/transfer public/private repository.
|
||||
- Repository viewer/release/issue tracker.
|
||||
- Gravatar and cache support.
|
||||
- Mail service(register, issue).
|
||||
- Administration panel.
|
||||
- Supports MySQL, PostgreSQL and SQLite3.
|
||||
- SSH/HTTP(S) protocol support
|
||||
- SMTP/LDAP/reverse proxy authentication support
|
||||
- Reverse proxy suburl support
|
||||
- Register/delete/rename account
|
||||
- Create/manage/delete organization with team management
|
||||
- Create/fork/migrate/mirror/delete/watch/rename/transfer public/private repository
|
||||
- Repository viewer/release/issue tracker
|
||||
- Repository and Organization level webhooks
|
||||
- Repository Git hooks
|
||||
- Add/remove repository collaborators
|
||||
- Gravatar and cache support
|
||||
- Mail service(register, issue)
|
||||
- Administration panel
|
||||
- Slack webhook integration
|
||||
- Drone CI integration
|
||||
- Supports MySQL, PostgreSQL and SQLite3
|
||||
- Social account login(GitHub, Google, QQ, Weibo)
|
||||
- Multi-language support([7 languages](https://crowdin.com/project/gogs))
|
||||
|
||||
## System Requirements
|
||||
|
||||
@@ -49,31 +57,31 @@ More importantly, Gogs only needs one binary to setup your own project hosting o
|
||||
|
||||
## Installation
|
||||
|
||||
Make sure you install [Prerequirements](https://github.com/gogits/gogs/wiki/Prerequirements) first.
|
||||
Make sure you install [Prerequirements](http://gogs.io/docs/installation/) first.
|
||||
|
||||
There are 3 ways to install Gogs:
|
||||
There are 5 ways to install Gogs:
|
||||
|
||||
- [Install from binary](https://github.com/gogits/gogs/wiki/Install-from-binary): **STRONGLY RECOMMENDED**
|
||||
- [Install from source](https://github.com/gogits/gogs/wiki/Install-from-source)
|
||||
- [Ship with Docker](https://github.com/gogits/gogs/tree/master/dockerfiles)
|
||||
- [Install from binary](http://gogs.io/docs/installation/install_from_binary.md)
|
||||
- [Install from source](http://gogs.io/docs/installation/install_from_source.md)
|
||||
- [Install from packages](http://gogs.io/docs/installation/install_from_packages.md)
|
||||
- [Ship with Docker](https://github.com/gogits/gogs/tree/master/docker)
|
||||
- [Install with Vagrant](https://github.com/geerlingguy/ansible-vagrant-examples/tree/master/gogs)
|
||||
|
||||
## Acknowledgments
|
||||
|
||||
- Router and middleware mechanism of [martini](http://martini.codegangsta.io/).
|
||||
- Router and middleware mechanism of [Macaron](https://github.com/Unknwon/macaron).
|
||||
- Mail Service, modules design is inspired by [WeTalk](https://github.com/beego/wetalk).
|
||||
- System Monitor Status is inspired by [GoBlog](https://github.com/fuxiaohei/goblog).
|
||||
- Usage and modification from [beego](http://beego.me) modules.
|
||||
- Thanks [lavachen](http://www.lavachen.cn/) for designing Logo.
|
||||
- Thanks [lavachen](http://www.lavachen.cn/) and [Rocker](http://weibo.com/rocker1989) for designing Logo.
|
||||
- Thanks [gobuild.io](http://gobuild.io) for providing binary compile and download service.
|
||||
- Great thanks to [Docker China](http://www.dockboard.org/) for providing [dockerfiles](https://github.com/gogits/gogs/tree/master/dockerfiles).
|
||||
- Thanks [Crowdin](https://crowdin.com/project/gogs) for providing open source translation plan.
|
||||
|
||||
## Contributors
|
||||
|
||||
This project was launched by [Unknwon](https://github.com/Unknwon) and [lunny](https://github.com/lunny); [fuxiaohei](https://github.com/fuxiaohei), [slene](https://github.com/slene) and [codeskyblue](https://github.com/codeskyblue) joined the team soon after. See [contributors page](https://github.com/gogits/gogs/graphs/contributors) for full list of contributors.
|
||||
|
||||
[][koding]
|
||||
[koding]: https://koding.com/Teamwork?import=https://github.com/gogits/gogs/archive/master.zip&c=git1
|
||||
- The [core team](http://gogs.io/team) of this project.
|
||||
- See [contributors page](https://github.com/gogits/gogs/graphs/contributors) for full list of contributors.
|
||||
- See [TRANSLATORS](conf/locale/TRANSLATORS) for full list of translators.
|
||||
|
||||
## License
|
||||
|
||||
Gogs is under the MIT License. See the [LICENSE](https://github.com/gogits/gogs/blob/master/LICENSE) file for the full license text.
|
||||
This project is under the MIT License. See the [LICENSE](https://github.com/gogits/gogs/blob/master/LICENSE) file for the full license text.
|
||||
|
||||
69
README_ZH.md
69
README_ZH.md
@@ -1,71 +1,78 @@
|
||||
Gogs - Go Git Service [](https://app.wercker.com/project/bykey/ad0bdb0bc450ac6f09bc56b9640a50aa) [](https://drone.io/github.com/gogits/gogs/latest)
|
||||
Gogs - Go Git Service [](https://app.wercker.com/project/bykey/ad0bdb0bc450ac6f09bc56b9640a50aa) [](https://travis-ci.org/gogits/gogs)
|
||||
=====================
|
||||
|
||||
Gogs(Go Git Service) 是一个由 Go 语言编写的自助 Git 托管服务。
|
||||
Gogs(Go Git Service) 是一个基于 Go 语言的自助 Git 服务。
|
||||
|
||||

|
||||

|
||||
|
||||
##### 当前版本:0.3.1 Alpha
|
||||
##### 当前版本:0.5.8 Beta
|
||||
|
||||
## 开发目的
|
||||
|
||||
Gogs 完全使用 Go 语言来实现对 Git 数据的操作,实现 **零** 依赖,并且支持 Go 语言所支持的 **所有平台**,包括 Linux、Mac OS X 以及 Windows。
|
||||
|
||||
更重要的是,您只需要一个可执行文件就能借助 Gogs 快速搭建属于您自己的代码托管服务!
|
||||
Gogs 的目标是打造一个最简单、最快速和最轻松的方式搭建自助 Git 服务。使用 Go 语言开发使得 Gogs 能够通过独立的二进制分发,并且支持 Go 语言支持的 **所有平台**,包括 Linux、Mac OS X 以及 Windows。
|
||||
|
||||
## 项目概览
|
||||
|
||||
- 有关项目设计、已知问题和变更日志,请通过 [Wiki](https://github.com/gogits/gogs/wiki) 查看。
|
||||
- 有关项目设计、已知问题和变更日志,请通过 [使用手册](http://gogs.io/docs/intro/) 查看。
|
||||
- 您可以到 [Trello Board](https://trello.com/b/uxAoeLUl/gogs-go-git-service) 跟随开发团队的脚步。
|
||||
- 想要先睹为快?通过 [在线体验](http://try.gogits.org/Unknown/gogs) 或查看 **安装部署 -> 二进制安装** 小节。
|
||||
- 使用过程中遇到问题?尝试从 [故障排查](https://github.com/gogits/gogs/wiki/Troubleshooting) 页面获取帮助。
|
||||
- 想要先睹为快?通过 [在线体验](https://try.gogs.io/Unknown/gogs) 或查看 **安装部署 -> 二进制安装** 小节。
|
||||
- 使用过程中遇到问题?尝试从 [故障排查](http://gogs.io/docs/intro/troubleshooting.md) 页面获取帮助。
|
||||
- 希望帮助多国语言界面的翻译吗?请立即访问 [Crowdin](https://crowdin.com/project/gogs)!
|
||||
|
||||
## 功能特性
|
||||
|
||||
- 活动时间线
|
||||
- SSH/HTTP(S) 协议支持
|
||||
- 注册/删除/重命名用户
|
||||
- 创建/迁移/镜像/删除/关注/重命名/转移 公开/私有 仓库
|
||||
- 仓库 浏览器/发布/缺陷追踪
|
||||
- Gravatar 以及缓存支持
|
||||
- 邮件服务(注册、Issue)
|
||||
- 支持 SSH/HTTP(S) 协议
|
||||
- 支持 SMTP/LDAP/反向代理 用户认证
|
||||
- 支持反向代理子路径
|
||||
- 支持 注册/删除/重命名 用户
|
||||
- 支持 创建/管理/删除 组织以及团队管理功能
|
||||
- 支持 创建/派生/迁移/镜像/删除/关注/重命名/转移 公开/私有 仓库
|
||||
- 支持仓库 浏览/发布/工单管理
|
||||
- 支持仓库和组织级别 Web 钩子
|
||||
- 支持仓库 Git 钩子
|
||||
- 支持 添加/删除 仓库协作者
|
||||
- 支持 Gravatar 以及本地缓存
|
||||
- 支持邮件服务(注册、Issue)
|
||||
- 管理员面板
|
||||
- Slack Web 钩子集成
|
||||
- Drone CI 持续部署集成
|
||||
- 支持 MySQL、PostgreSQL 以及 SQLite3 数据库
|
||||
- 社交帐号登录(GitHub、Google、QQ、微博)
|
||||
- 多语言支持([7 种语言]([more](https://crowdin.com/project/gogs)))
|
||||
|
||||
## 系统要求
|
||||
|
||||
- 最低的系统硬件要求为一个廉价的树莓派
|
||||
- 如果用于团队项目,建议使用 4 核 CPU 及 1GB 内存
|
||||
|
||||
|
||||
## 安装部署
|
||||
|
||||
在安装 Gogs 之前,您需要先安装 [基本环境](https://github.com/gogits/gogs/wiki/Prerequirements)。
|
||||
在安装 Gogs 之前,您需要先安装 [基本环境](http://gogs.io/docs/installation/)。
|
||||
|
||||
然后,您可以通过以下 3 种方式来安装 Gogs:
|
||||
然后,您可以通过以下 5 种方式来安装 Gogs:
|
||||
|
||||
- [二进制安装](https://github.com/gogits/gogs/wiki/Install-from-binary): **强烈推荐**
|
||||
- [源码安装](https://github.com/gogits/gogs/wiki/Install-from-source)
|
||||
- [采用 Docker 部署](https://github.com/gogits/gogs/tree/master/dockerfiles)
|
||||
- [二进制安装](http://gogs.io/docs/installation/install_from_binary.md)
|
||||
- [源码安装](http://gogs.io/docs/installation/install_from_source.md)
|
||||
- [包管理安装](http://gogs.io/docs/installation/install_from_packages.md)
|
||||
- [采用 Docker 部署](https://github.com/gogits/gogs/tree/master/docker)
|
||||
- [通过 Vagrant 安装](https://github.com/geerlingguy/ansible-vagrant-examples/tree/master/gogs)
|
||||
|
||||
## 特别鸣谢
|
||||
|
||||
- 基于 [Macaron](https://github.com/Unknwon/macaron) 的路由与中间件机制。
|
||||
- 基于 [WeTalk](https://github.com/beego/wetalk) 修改的邮件服务和模块设计。
|
||||
- 基于 [GoBlog](https://github.com/fuxiaohei/goblog) 修改的系统监视状态。
|
||||
- [beego](http://beego.me) 模块的使用与修改。
|
||||
- [martini](http://martini.codegangsta.io/) 的路由与中间件机制。
|
||||
- 感谢 [gobuild.io](http://gobuild.io) 提供二进制编译与下载服务。
|
||||
- 感谢 [lavachen](http://www.lavachen.cn/) 设计的 Logo。
|
||||
- 感谢 [Docker 中文社区](http://www.dockboard.org/) 提供的 [dockerfiles](https://github.com/gogits/gogs/tree/master/dockerfiles)。
|
||||
- 感谢 [lavachen](http://www.lavachen.cn/) 和 [Rocker](http://weibo.com/rocker1989) 设计的 Logo。
|
||||
- 感谢 [Crowdin](https://crowdin.com/project/gogs) 提供免费的开源项目本地化支持。
|
||||
|
||||
## 贡献成员
|
||||
|
||||
本项目最初由 [Unknown](https://github.com/Unknwon) 和 [lunny](https://github.com/lunny) 发起,随后 [fuxiaohei](https://github.com/fuxiaohei)、[slene](https://github.com/slene) 以及 [codeskyblue](https://github.com/codeskyblue) 加入到开发团队。您可以通过查看 [贡献者页面](https://github.com/gogits/gogs/graphs/contributors) 获取完整的贡献者列表。
|
||||
|
||||
[][koding]
|
||||
[koding]: https://koding.com/Teamwork?import=https://github.com/gogits/gogs/archive/master.zip&c=git1
|
||||
- 本项目的 [开发团队](http://gogs.io/team)。
|
||||
- 您可以通过查看 [贡献者页面](https://github.com/gogits/gogs/graphs/contributors) 获取完整的贡献者列表。
|
||||
- 您可以通过查看 [TRANSLATORS](conf/locale/TRANSLATORS) 文件获取完整的翻译人员列表。
|
||||
|
||||
## 授权许可
|
||||
|
||||
Gogs 采用 MIT 开源授权许可证,完整的授权说明已放置在 [LICENSE](https://github.com/gogits/gogs/blob/master/LICENSE) 文件中。
|
||||
本项目采用 MIT 开源授权许可证,完整的授权说明已放置在 [LICENSE](https://github.com/gogits/gogs/blob/master/LICENSE) 文件中。
|
||||
24
bee.json
24
bee.json
@@ -1,24 +0,0 @@
|
||||
{
|
||||
"version": 0,
|
||||
"gopm": {
|
||||
"enable": false,
|
||||
"install": false
|
||||
},
|
||||
"go_install": true,
|
||||
"watch_ext": [],
|
||||
"dir_structure": {
|
||||
"watch_all": true,
|
||||
"controllers": "routers",
|
||||
"models": "",
|
||||
"others": [
|
||||
"modules",
|
||||
"$GOPATH/src/github.com/gogits/logs",
|
||||
"$GOPATH/src/github.com/gogits/git",
|
||||
"$GOPATH/src/github.com/gogits/gfm"
|
||||
]
|
||||
},
|
||||
"cmd_args": [
|
||||
"web"
|
||||
],
|
||||
"envs": []
|
||||
}
|
||||
160
cmd/cert.go
Normal file
160
cmd/cert.go
Normal file
@@ -0,0 +1,160 @@
|
||||
// +build cert
|
||||
|
||||
// Copyright 2009 The Go Authors. All rights reserved.
|
||||
// Copyright 2014 The Gogs Authors. All rights reserved.
|
||||
// Use of this source code is governed by a MIT-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"crypto/ecdsa"
|
||||
"crypto/elliptic"
|
||||
"crypto/rand"
|
||||
"crypto/rsa"
|
||||
"crypto/x509"
|
||||
"crypto/x509/pkix"
|
||||
"encoding/pem"
|
||||
"log"
|
||||
"math/big"
|
||||
"net"
|
||||
"os"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/codegangsta/cli"
|
||||
)
|
||||
|
||||
var CmdCert = cli.Command{
|
||||
Name: "cert",
|
||||
Usage: "Generate self-signed certificate",
|
||||
Description: `Generate a self-signed X.509 certificate for a TLS server.
|
||||
Outputs to 'cert.pem' and 'key.pem' and will overwrite existing files.`,
|
||||
Action: runCert,
|
||||
Flags: []cli.Flag{
|
||||
cli.StringFlag{"host", "", "Comma-separated hostnames and IPs to generate a certificate for", ""},
|
||||
cli.StringFlag{"ecdsa-curve", "", "ECDSA curve to use to generate a key. Valid values are P224, P256, P384, P521", ""},
|
||||
cli.IntFlag{"rsa-bits", 2048, "Size of RSA key to generate. Ignored if --ecdsa-curve is set", ""},
|
||||
cli.StringFlag{"start-date", "", "Creation date formatted as Jan 1 15:04:05 2011", ""},
|
||||
cli.DurationFlag{"duration", 365 * 24 * time.Hour, "Duration that certificate is valid for", ""},
|
||||
cli.BoolFlag{"ca", "whether this cert should be its own Certificate Authority", ""},
|
||||
},
|
||||
}
|
||||
|
||||
func publicKey(priv interface{}) interface{} {
|
||||
switch k := priv.(type) {
|
||||
case *rsa.PrivateKey:
|
||||
return &k.PublicKey
|
||||
case *ecdsa.PrivateKey:
|
||||
return &k.PublicKey
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func pemBlockForKey(priv interface{}) *pem.Block {
|
||||
switch k := priv.(type) {
|
||||
case *rsa.PrivateKey:
|
||||
return &pem.Block{Type: "RSA PRIVATE KEY", Bytes: x509.MarshalPKCS1PrivateKey(k)}
|
||||
case *ecdsa.PrivateKey:
|
||||
b, err := x509.MarshalECPrivateKey(k)
|
||||
if err != nil {
|
||||
log.Fatal("unable to marshal ECDSA private key: %v", err)
|
||||
}
|
||||
return &pem.Block{Type: "EC PRIVATE KEY", Bytes: b}
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func runCert(ctx *cli.Context) {
|
||||
if len(ctx.String("host")) == 0 {
|
||||
log.Fatal("Missing required --host parameter")
|
||||
}
|
||||
|
||||
var priv interface{}
|
||||
var err error
|
||||
switch ctx.String("ecdsa-curve") {
|
||||
case "":
|
||||
priv, err = rsa.GenerateKey(rand.Reader, ctx.Int("rsa-bits"))
|
||||
case "P224":
|
||||
priv, err = ecdsa.GenerateKey(elliptic.P224(), rand.Reader)
|
||||
case "P256":
|
||||
priv, err = ecdsa.GenerateKey(elliptic.P256(), rand.Reader)
|
||||
case "P384":
|
||||
priv, err = ecdsa.GenerateKey(elliptic.P384(), rand.Reader)
|
||||
case "P521":
|
||||
priv, err = ecdsa.GenerateKey(elliptic.P521(), rand.Reader)
|
||||
default:
|
||||
log.Fatalf("Unrecognized elliptic curve: %q", ctx.String("ecdsa-curve"))
|
||||
}
|
||||
if err != nil {
|
||||
log.Fatalf("Failed to generate private key: %s", err)
|
||||
}
|
||||
|
||||
var notBefore time.Time
|
||||
if len(ctx.String("start-date")) == 0 {
|
||||
notBefore = time.Now()
|
||||
} else {
|
||||
notBefore, err = time.Parse("Jan 2 15:04:05 2006", ctx.String("start-date"))
|
||||
if err != nil {
|
||||
log.Fatalf("Failed to parse creation date: %s", err)
|
||||
}
|
||||
}
|
||||
|
||||
notAfter := notBefore.Add(ctx.Duration("duration"))
|
||||
|
||||
serialNumberLimit := new(big.Int).Lsh(big.NewInt(1), 128)
|
||||
serialNumber, err := rand.Int(rand.Reader, serialNumberLimit)
|
||||
if err != nil {
|
||||
log.Fatalf("Failed to generate serial number: %s", err)
|
||||
}
|
||||
|
||||
template := x509.Certificate{
|
||||
SerialNumber: serialNumber,
|
||||
Subject: pkix.Name{
|
||||
Organization: []string{"Acme Co"},
|
||||
},
|
||||
NotBefore: notBefore,
|
||||
NotAfter: notAfter,
|
||||
|
||||
KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature,
|
||||
ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageServerAuth},
|
||||
BasicConstraintsValid: true,
|
||||
}
|
||||
|
||||
hosts := strings.Split(ctx.String("host"), ",")
|
||||
for _, h := range hosts {
|
||||
if ip := net.ParseIP(h); ip != nil {
|
||||
template.IPAddresses = append(template.IPAddresses, ip)
|
||||
} else {
|
||||
template.DNSNames = append(template.DNSNames, h)
|
||||
}
|
||||
}
|
||||
|
||||
if ctx.Bool("ca") {
|
||||
template.IsCA = true
|
||||
template.KeyUsage |= x509.KeyUsageCertSign
|
||||
}
|
||||
|
||||
derBytes, err := x509.CreateCertificate(rand.Reader, &template, &template, publicKey(priv), priv)
|
||||
if err != nil {
|
||||
log.Fatalf("Failed to create certificate: %s", err)
|
||||
}
|
||||
|
||||
certOut, err := os.Create("cert.pem")
|
||||
if err != nil {
|
||||
log.Fatalf("Failed to open cert.pem for writing: %s", err)
|
||||
}
|
||||
pem.Encode(certOut, &pem.Block{Type: "CERTIFICATE", Bytes: derBytes})
|
||||
certOut.Close()
|
||||
log.Println("Written cert.pem")
|
||||
|
||||
keyOut, err := os.OpenFile("key.pem", os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0600)
|
||||
if err != nil {
|
||||
log.Fatal("failed to open key.pem for writing: %v", err)
|
||||
}
|
||||
pem.Encode(keyOut, pemBlockForKey(priv))
|
||||
keyOut.Close()
|
||||
log.Println("Written key.pem")
|
||||
}
|
||||
36
cmd/cert_stub.go
Normal file
36
cmd/cert_stub.go
Normal file
@@ -0,0 +1,36 @@
|
||||
// +build !cert
|
||||
|
||||
// Copyright 2009 The Go Authors. All rights reserved.
|
||||
// Copyright 2014 The Gogs Authors. All rights reserved.
|
||||
// Use of this source code is governed by a MIT-style
|
||||
// license that can be found in the LICENSE file.
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/codegangsta/cli"
|
||||
)
|
||||
|
||||
var CmdCert = cli.Command{
|
||||
Name: "cert",
|
||||
Usage: "Generate self-signed certificate",
|
||||
Description: `Generate a self-signed X.509 certificate for a TLS server.
|
||||
Outputs to 'cert.pem' and 'key.pem' and will overwrite existing files.`,
|
||||
Action: runCert,
|
||||
Flags: []cli.Flag{
|
||||
cli.StringFlag{"host", "", "Comma-separated hostnames and IPs to generate a certificate for", ""},
|
||||
cli.StringFlag{"ecdsa-curve", "", "ECDSA curve to use to generate a key. Valid values are P224, P256, P384, P521", ""},
|
||||
cli.IntFlag{"rsa-bits", 2048, "Size of RSA key to generate. Ignored if --ecdsa-curve is set", ""},
|
||||
cli.StringFlag{"start-date", "", "Creation date formatted as Jan 1 15:04:05 2011", ""},
|
||||
cli.DurationFlag{"duration", 365 * 24 * time.Hour, "Duration that certificate is valid for", ""},
|
||||
cli.BoolFlag{"ca", "whether this cert should be its own Certificate Authority", ""},
|
||||
},
|
||||
}
|
||||
|
||||
func runCert(ctx *cli.Context) {
|
||||
fmt.Println("Command cert not available, please use build tags 'cert' to rebuild.")
|
||||
os.Exit(1)
|
||||
}
|
||||
70
cmd/dump.go
Normal file
70
cmd/dump.go
Normal file
@@ -0,0 +1,70 @@
|
||||
// Copyright 2014 The Gogs Authors. All rights reserved.
|
||||
// Use of this source code is governed by a MIT-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"os"
|
||||
"path"
|
||||
"time"
|
||||
|
||||
"github.com/Unknwon/cae/zip"
|
||||
"github.com/codegangsta/cli"
|
||||
|
||||
"github.com/gogits/gogs/models"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
)
|
||||
|
||||
var CmdDump = cli.Command{
|
||||
Name: "dump",
|
||||
Usage: "Dump Gogs files and database",
|
||||
Description: `Dump compresses all related files and database into zip file.
|
||||
It can be used for backup and capture Gogs server image to send to maintainer`,
|
||||
Action: runDump,
|
||||
Flags: []cli.Flag{
|
||||
cli.BoolFlag{"verbose, v", "show process details", ""},
|
||||
},
|
||||
}
|
||||
|
||||
func runDump(ctx *cli.Context) {
|
||||
setting.NewConfigContext()
|
||||
models.LoadModelsConfig()
|
||||
models.SetEngine()
|
||||
|
||||
log.Printf("Dumping local repositories...%s", setting.RepoRootPath)
|
||||
zip.Verbose = ctx.Bool("verbose")
|
||||
defer os.Remove("gogs-repo.zip")
|
||||
if err := zip.PackTo(setting.RepoRootPath, "gogs-repo.zip", true); err != nil {
|
||||
log.Fatalf("Fail to dump local repositories: %v", err)
|
||||
}
|
||||
|
||||
log.Printf("Dumping database...")
|
||||
defer os.Remove("gogs-db.sql")
|
||||
if err := models.DumpDatabase("gogs-db.sql"); err != nil {
|
||||
log.Fatalf("Fail to dump database: %v", err)
|
||||
}
|
||||
|
||||
fileName := fmt.Sprintf("gogs-dump-%d.zip", time.Now().Unix())
|
||||
log.Printf("Packing dump files...")
|
||||
z, err := zip.Create(fileName)
|
||||
if err != nil {
|
||||
os.Remove(fileName)
|
||||
log.Fatalf("Fail to create %s: %v", fileName, err)
|
||||
}
|
||||
|
||||
workDir, _ := setting.WorkDir()
|
||||
z.AddFile("gogs-repo.zip", path.Join(workDir, "gogs-repo.zip"))
|
||||
z.AddFile("gogs-db.sql", path.Join(workDir, "gogs-db.sql"))
|
||||
z.AddDir("custom", path.Join(workDir, "custom"))
|
||||
z.AddDir("log", path.Join(workDir, "log"))
|
||||
// FIXME: SSH key file.
|
||||
if err = z.Close(); err != nil {
|
||||
os.Remove(fileName)
|
||||
log.Fatalf("Fail to save %s: %v", fileName, err)
|
||||
}
|
||||
|
||||
log.Println("Finish dumping!")
|
||||
}
|
||||
184
cmd/fix.go
Normal file
184
cmd/fix.go
Normal file
@@ -0,0 +1,184 @@
|
||||
// Copyright 2014 The Gogs Authors. All rights reserved.
|
||||
// Use of this source code is governed by a MIT-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path"
|
||||
"runtime"
|
||||
"strings"
|
||||
|
||||
"github.com/Unknwon/com"
|
||||
"github.com/codegangsta/cli"
|
||||
|
||||
"github.com/gogits/gogs/models"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
)
|
||||
|
||||
var CmdFix = cli.Command{
|
||||
Name: "fix",
|
||||
Usage: "This command for upgrade from old version",
|
||||
Action: runFix,
|
||||
Subcommands: fixCommands,
|
||||
Flags: []cli.Flag{},
|
||||
}
|
||||
|
||||
func runFix(ctx *cli.Context) {
|
||||
}
|
||||
|
||||
var fixCommands = []cli.Command{
|
||||
{
|
||||
Name: "location",
|
||||
Usage: "Change Gogs app location",
|
||||
Description: `Command location fixes location change of Gogs
|
||||
|
||||
gogs fix location <old Gogs path>
|
||||
`,
|
||||
Action: runFixLocation,
|
||||
},
|
||||
}
|
||||
|
||||
// rewriteAuthorizedKeys replaces old Gogs path to the new one.
|
||||
func rewriteAuthorizedKeys(sshPath, oldPath, newPath string) error {
|
||||
fr, err := os.Open(sshPath)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer fr.Close()
|
||||
|
||||
tmpPath := sshPath + ".tmp"
|
||||
fw, err := os.Create(tmpPath)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer fw.Close()
|
||||
|
||||
oldPath = "command=\"" + oldPath + " serv"
|
||||
newPath = "command=\"" + newPath + " serv"
|
||||
buf := bufio.NewReader(fr)
|
||||
for {
|
||||
line, errRead := buf.ReadString('\n')
|
||||
line = strings.TrimSpace(line)
|
||||
|
||||
if errRead != nil {
|
||||
if errRead != io.EOF {
|
||||
return errRead
|
||||
}
|
||||
|
||||
// Reached end of file, if nothing to read then break,
|
||||
// otherwise handle the last line.
|
||||
if len(line) == 0 {
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
// Still finding the line, copy the line that currently read.
|
||||
if _, err = fw.WriteString(strings.Replace(line, oldPath, newPath, 1) + "\n"); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if errRead == io.EOF {
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
if err = os.Remove(sshPath); err != nil {
|
||||
return err
|
||||
}
|
||||
return os.Rename(tmpPath, sshPath)
|
||||
}
|
||||
|
||||
func rewriteUpdateHook(path, appPath string) error {
|
||||
if runtime.GOOS == "windows" {
|
||||
rp := strings.NewReplacer("\\", "/")
|
||||
appPath = "\"" + rp.Replace(appPath) + "\""
|
||||
} else {
|
||||
rp := strings.NewReplacer("\\", "/", " ", "\\ ")
|
||||
appPath = rp.Replace(appPath)
|
||||
}
|
||||
|
||||
if err := ioutil.WriteFile(path, []byte(fmt.Sprintf(models.TPL_UPDATE_HOOK,
|
||||
setting.ScriptType, appPath)), os.ModePerm); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func walkDir(rootPath, recPath, appPath string, depth int) error {
|
||||
depth++
|
||||
if depth > 3 {
|
||||
return nil
|
||||
} else if depth == 3 {
|
||||
if err := rewriteUpdateHook(path.Join(rootPath, "hooks/update"), appPath); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
dir, err := os.Open(rootPath)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer dir.Close()
|
||||
|
||||
fis, err := dir.Readdir(0)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, fi := range fis {
|
||||
if strings.Contains(fi.Name(), ".DS_Store") {
|
||||
continue
|
||||
}
|
||||
|
||||
relPath := path.Join(recPath, fi.Name())
|
||||
curPath := path.Join(rootPath, fi.Name())
|
||||
if fi.IsDir() {
|
||||
if err = walkDir(curPath, relPath, appPath, depth); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func runFixLocation(ctx *cli.Context) {
|
||||
if len(ctx.Args()) != 1 {
|
||||
fmt.Println("Incorrect arguments number, expect 1")
|
||||
os.Exit(2)
|
||||
}
|
||||
|
||||
execPath, _ := setting.ExecPath()
|
||||
|
||||
oldPath := ctx.Args().First()
|
||||
fmt.Printf("Old location: %s\n", oldPath)
|
||||
fmt.Println("This command should be executed in the new Gogs path")
|
||||
fmt.Printf("Do you want to change Gogs app path from old location to:\n")
|
||||
fmt.Printf("-> %s?\n", execPath)
|
||||
fmt.Print("Press <enter> to continue, use <Ctrl+c> to exit.")
|
||||
fmt.Scanln()
|
||||
|
||||
// Fix in authorized_keys file.
|
||||
sshPath := path.Join(models.SshPath, "authorized_keys")
|
||||
if com.IsFile(sshPath) {
|
||||
fmt.Printf("Fixing pathes in file: %s\n", sshPath)
|
||||
if err := rewriteAuthorizedKeys(sshPath, oldPath, execPath); err != nil {
|
||||
fmt.Println(err)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
// Fix position in gogs-repositories.
|
||||
setting.NewConfigContext()
|
||||
fmt.Printf("Fixing pathes in repositories: %s\n", setting.RepoRootPath)
|
||||
if err := walkDir(setting.RepoRootPath, "", execPath, 0); err != nil {
|
||||
fmt.Println(err)
|
||||
os.Exit(1)
|
||||
}
|
||||
fmt.Println("Fix position finished!")
|
||||
}
|
||||
218
cmd/serve.go
Normal file
218
cmd/serve.go
Normal file
@@ -0,0 +1,218 @@
|
||||
// Copyright 2014 The Gogs Authors. All rights reserved.
|
||||
// Use of this source code is governed by a MIT-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/Unknwon/com"
|
||||
"github.com/codegangsta/cli"
|
||||
|
||||
"github.com/gogits/gogs/models"
|
||||
"github.com/gogits/gogs/modules/log"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/modules/uuid"
|
||||
)
|
||||
|
||||
var CmdServ = cli.Command{
|
||||
Name: "serv",
|
||||
Usage: "This command should only be called by SSH shell",
|
||||
Description: `Serv provide access auth for repositories`,
|
||||
Action: runServ,
|
||||
Flags: []cli.Flag{},
|
||||
}
|
||||
|
||||
func setup(logPath string) {
|
||||
setting.NewConfigContext()
|
||||
log.NewGitLogger(filepath.Join(setting.LogRootPath, logPath))
|
||||
models.LoadModelsConfig()
|
||||
|
||||
if models.UseSQLite3 {
|
||||
workDir, _ := setting.WorkDir()
|
||||
os.Chdir(workDir)
|
||||
}
|
||||
|
||||
models.SetEngine()
|
||||
}
|
||||
|
||||
func parseCmd(cmd string) (string, string) {
|
||||
ss := strings.SplitN(cmd, " ", 2)
|
||||
if len(ss) != 2 {
|
||||
return "", ""
|
||||
}
|
||||
|
||||
verb, args := ss[0], ss[1]
|
||||
if verb == "git" {
|
||||
ss = strings.SplitN(args, " ", 2)
|
||||
args = ss[1]
|
||||
verb = fmt.Sprintf("%s %s", verb, ss[0])
|
||||
}
|
||||
return verb, strings.Replace(args, "'/", "'", 1)
|
||||
}
|
||||
|
||||
var (
|
||||
COMMANDS_READONLY = map[string]models.AccessType{
|
||||
"git-upload-pack": models.WRITABLE,
|
||||
"git upload-pack": models.WRITABLE,
|
||||
"git-upload-archive": models.WRITABLE,
|
||||
}
|
||||
|
||||
COMMANDS_WRITE = map[string]models.AccessType{
|
||||
"git-receive-pack": models.READABLE,
|
||||
"git receive-pack": models.READABLE,
|
||||
}
|
||||
)
|
||||
|
||||
func In(b string, sl map[string]models.AccessType) bool {
|
||||
_, e := sl[b]
|
||||
return e
|
||||
}
|
||||
|
||||
func runServ(k *cli.Context) {
|
||||
setup("serv.log")
|
||||
|
||||
keys := strings.Split(os.Args[2], "-")
|
||||
if len(keys) != 2 {
|
||||
println("Gogs: auth file format error")
|
||||
log.GitLogger.Fatal(2, "Invalid auth file format: %s", os.Args[2])
|
||||
}
|
||||
|
||||
keyId, err := com.StrTo(keys[1]).Int64()
|
||||
if err != nil {
|
||||
println("Gogs: auth file format error")
|
||||
log.GitLogger.Fatal(2, "Invalid auth file format: %v", err)
|
||||
}
|
||||
user, err := models.GetUserByKeyId(keyId)
|
||||
if err != nil {
|
||||
if err == models.ErrUserNotKeyOwner {
|
||||
println("Gogs: you are not the owner of SSH key")
|
||||
log.GitLogger.Fatal(2, "Invalid owner of SSH key: %d", keyId)
|
||||
}
|
||||
println("Gogs: internal error:", err.Error())
|
||||
log.GitLogger.Fatal(2, "Fail to get user by key ID(%d): %v", keyId, err)
|
||||
}
|
||||
|
||||
cmd := os.Getenv("SSH_ORIGINAL_COMMAND")
|
||||
if cmd == "" {
|
||||
println("Hi", user.Name, "! You've successfully authenticated, but Gogs does not provide shell access.")
|
||||
return
|
||||
}
|
||||
|
||||
verb, args := parseCmd(cmd)
|
||||
repoPath := strings.Trim(args, "'")
|
||||
rr := strings.SplitN(repoPath, "/", 2)
|
||||
if len(rr) != 2 {
|
||||
println("Gogs: unavailable repository", args)
|
||||
log.GitLogger.Fatal(2, "Unavailable repository: %v", args)
|
||||
}
|
||||
repoUserName := rr[0]
|
||||
repoName := strings.TrimSuffix(rr[1], ".git")
|
||||
|
||||
isWrite := In(verb, COMMANDS_WRITE)
|
||||
isRead := In(verb, COMMANDS_READONLY)
|
||||
|
||||
repoUser, err := models.GetUserByName(repoUserName)
|
||||
if err != nil {
|
||||
if err == models.ErrUserNotExist {
|
||||
println("Gogs: given repository owner are not registered")
|
||||
log.GitLogger.Fatal(2, "Unregistered owner: %s", repoUserName)
|
||||
}
|
||||
println("Gogs: internal error:", err.Error())
|
||||
log.GitLogger.Fatal(2, "Fail to get repository owner(%s): %v", repoUserName, err)
|
||||
}
|
||||
|
||||
// Access check.
|
||||
switch {
|
||||
case isWrite:
|
||||
has, err := models.HasAccess(user.Name, path.Join(repoUserName, repoName), models.WRITABLE)
|
||||
if err != nil {
|
||||
println("Gogs: internal error:", err.Error())
|
||||
log.GitLogger.Fatal(2, "Fail to check write access:", err)
|
||||
} else if !has {
|
||||
println("You have no right to write this repository")
|
||||
log.GitLogger.Fatal(2, "User %s has no right to write repository %s", user.Name, repoPath)
|
||||
}
|
||||
case isRead:
|
||||
repo, err := models.GetRepositoryByName(repoUser.Id, repoName)
|
||||
if err != nil {
|
||||
if err == models.ErrRepoNotExist {
|
||||
println("Gogs: given repository does not exist")
|
||||
log.GitLogger.Fatal(2, "Repository does not exist: %s/%s", repoUser.Name, repoName)
|
||||
}
|
||||
println("Gogs: internal error:", err.Error())
|
||||
log.GitLogger.Fatal(2, "Fail to get repository: %v", err)
|
||||
}
|
||||
|
||||
if !repo.IsPrivate {
|
||||
break
|
||||
}
|
||||
|
||||
has, err := models.HasAccess(user.Name, path.Join(repoUserName, repoName), models.READABLE)
|
||||
if err != nil {
|
||||
println("Gogs: internal error:", err.Error())
|
||||
log.GitLogger.Fatal(2, "Fail to check read access:", err)
|
||||
} else if !has {
|
||||
println("You have no right to access this repository")
|
||||
log.GitLogger.Fatal(2, "User %s has no right to read repository %s", user.Name, repoPath)
|
||||
}
|
||||
default:
|
||||
println("Unknown command: " + cmd)
|
||||
return
|
||||
}
|
||||
|
||||
uuid := uuid.NewV4().String()
|
||||
os.Setenv("uuid", uuid)
|
||||
|
||||
var gitcmd *exec.Cmd
|
||||
verbs := strings.Split(verb, " ")
|
||||
if len(verbs) == 2 {
|
||||
gitcmd = exec.Command(verbs[0], verbs[1], repoPath)
|
||||
} else {
|
||||
gitcmd = exec.Command(verb, repoPath)
|
||||
}
|
||||
gitcmd.Dir = setting.RepoRootPath
|
||||
gitcmd.Stdout = os.Stdout
|
||||
gitcmd.Stdin = os.Stdin
|
||||
gitcmd.Stderr = os.Stderr
|
||||
if err = gitcmd.Run(); err != nil {
|
||||
println("Gogs: internal error:", err.Error())
|
||||
log.GitLogger.Fatal(2, "Fail to execute git command: %v", err)
|
||||
}
|
||||
|
||||
if isWrite {
|
||||
tasks, err := models.GetUpdateTasksByUuid(uuid)
|
||||
if err != nil {
|
||||
log.GitLogger.Fatal(2, "GetUpdateTasksByUuid: %v", err)
|
||||
}
|
||||
|
||||
for _, task := range tasks {
|
||||
err = models.Update(task.RefName, task.OldCommitId, task.NewCommitId,
|
||||
user.Name, repoUserName, repoName, user.Id)
|
||||
if err != nil {
|
||||
log.GitLogger.Error(2, "Fail to update: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
if err = models.DelUpdateTasksByUuid(uuid); err != nil {
|
||||
log.GitLogger.Fatal(2, "DelUpdateTasksByUuid: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
// Update key activity.
|
||||
key, err := models.GetPublicKeyById(keyId)
|
||||
if err != nil {
|
||||
log.GitLogger.Fatal(2, "GetPublicKeyById: %v", err)
|
||||
}
|
||||
key.Updated = time.Now()
|
||||
if err = models.UpdatePublicKey(key); err != nil {
|
||||
log.GitLogger.Fatal(2, "UpdatePublicKey: %v", err)
|
||||
}
|
||||
}
|
||||
51
cmd/update.go
Normal file
51
cmd/update.go
Normal file
@@ -0,0 +1,51 @@
|
||||
// Copyright 2014 The Gogs Authors. All rights reserved.
|
||||
// Use of this source code is governed by a MIT-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
"github.com/codegangsta/cli"
|
||||
|
||||
"github.com/gogits/gogs/models"
|
||||
"github.com/gogits/gogs/modules/log"
|
||||
)
|
||||
|
||||
var CmdUpdate = cli.Command{
|
||||
Name: "update",
|
||||
Usage: "This command should only be called by SSH shell",
|
||||
Description: `Update get pushed info and insert into database`,
|
||||
Action: runUpdate,
|
||||
Flags: []cli.Flag{},
|
||||
}
|
||||
|
||||
func runUpdate(c *cli.Context) {
|
||||
cmd := os.Getenv("SSH_ORIGINAL_COMMAND")
|
||||
if cmd == "" {
|
||||
return
|
||||
}
|
||||
|
||||
setup("update.log")
|
||||
|
||||
args := c.Args()
|
||||
if len(args) != 3 {
|
||||
log.GitLogger.Fatal(2, "received less 3 parameters")
|
||||
} else if args[0] == "" {
|
||||
log.GitLogger.Fatal(2, "refName is empty, shouldn't use")
|
||||
}
|
||||
|
||||
uuid := os.Getenv("uuid")
|
||||
|
||||
task := models.UpdateTask{
|
||||
Uuid: uuid,
|
||||
RefName: args[0],
|
||||
OldCommitId: args[1],
|
||||
NewCommitId: args[2],
|
||||
}
|
||||
|
||||
if err := models.AddUpdateTask(&task); err != nil {
|
||||
log.GitLogger.Fatal(2, err.Error())
|
||||
}
|
||||
}
|
||||
471
cmd/web.go
Normal file
471
cmd/web.go
Normal file
@@ -0,0 +1,471 @@
|
||||
// Copyright 2014 The Gogs Authors. All rights reserved.
|
||||
// Use of this source code is governed by a MIT-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"crypto/tls"
|
||||
"fmt"
|
||||
"html/template"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"net/http/fcgi"
|
||||
"os"
|
||||
"path"
|
||||
"strings"
|
||||
|
||||
"github.com/Unknwon/macaron"
|
||||
"github.com/codegangsta/cli"
|
||||
"github.com/macaron-contrib/binding"
|
||||
"github.com/macaron-contrib/cache"
|
||||
"github.com/macaron-contrib/captcha"
|
||||
"github.com/macaron-contrib/csrf"
|
||||
"github.com/macaron-contrib/i18n"
|
||||
"github.com/macaron-contrib/oauth2"
|
||||
"github.com/macaron-contrib/session"
|
||||
"github.com/macaron-contrib/toolbox"
|
||||
|
||||
api "github.com/gogits/go-gogs-client"
|
||||
|
||||
"github.com/gogits/gogs/models"
|
||||
"github.com/gogits/gogs/modules/auth"
|
||||
"github.com/gogits/gogs/modules/auth/apiv1"
|
||||
"github.com/gogits/gogs/modules/avatar"
|
||||
"github.com/gogits/gogs/modules/base"
|
||||
"github.com/gogits/gogs/modules/git"
|
||||
"github.com/gogits/gogs/modules/log"
|
||||
"github.com/gogits/gogs/modules/middleware"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/routers"
|
||||
"github.com/gogits/gogs/routers/admin"
|
||||
"github.com/gogits/gogs/routers/api/v1"
|
||||
"github.com/gogits/gogs/routers/dev"
|
||||
"github.com/gogits/gogs/routers/org"
|
||||
"github.com/gogits/gogs/routers/repo"
|
||||
"github.com/gogits/gogs/routers/user"
|
||||
)
|
||||
|
||||
var CmdWeb = cli.Command{
|
||||
Name: "web",
|
||||
Usage: "Start Gogs web server",
|
||||
Description: `Gogs web server is the only thing you need to run,
|
||||
and it takes care of all the other things for you`,
|
||||
Action: runWeb,
|
||||
Flags: []cli.Flag{},
|
||||
}
|
||||
|
||||
// checkVersion checks if binary matches the version of templates files.
|
||||
func checkVersion() {
|
||||
// Templates.
|
||||
data, err := ioutil.ReadFile(path.Join(setting.StaticRootPath, "templates/.VERSION"))
|
||||
if err != nil {
|
||||
log.Fatal(4, "Fail to read 'templates/.VERSION': %v", err)
|
||||
}
|
||||
if string(data) != setting.AppVer {
|
||||
log.Fatal(4, "Binary and template file version does not match, did you forget to recompile?")
|
||||
}
|
||||
|
||||
// Check dependency version.
|
||||
macaronVer := git.MustParseVersion(strings.Join(strings.Split(macaron.Version(), ".")[:3], "."))
|
||||
if macaronVer.LessThan(git.MustParseVersion("0.4.7")) {
|
||||
log.Fatal(4, "Package macaron version is too old, did you forget to update?(github.com/Unknwon/macaron)")
|
||||
}
|
||||
i18nVer := git.MustParseVersion(i18n.Version())
|
||||
if i18nVer.LessThan(git.MustParseVersion("0.0.2")) {
|
||||
log.Fatal(4, "Package i18n version is too old, did you forget to update?(github.com/macaron-contrib/i18n)")
|
||||
}
|
||||
sessionVer := git.MustParseVersion(session.Version())
|
||||
if sessionVer.LessThan(git.MustParseVersion("0.0.5")) {
|
||||
log.Fatal(4, "Package session version is too old, did you forget to update?(github.com/macaron-contrib/session)")
|
||||
}
|
||||
}
|
||||
|
||||
// newMacaron initializes Macaron instance.
|
||||
func newMacaron() *macaron.Macaron {
|
||||
m := macaron.New()
|
||||
m.Use(macaron.Logger())
|
||||
m.Use(macaron.Recovery())
|
||||
if setting.EnableGzip {
|
||||
m.Use(macaron.Gziper())
|
||||
}
|
||||
if setting.Protocol == setting.FCGI {
|
||||
m.SetURLPrefix(setting.AppSubUrl)
|
||||
}
|
||||
m.Use(macaron.Static(
|
||||
path.Join(setting.StaticRootPath, "public"),
|
||||
macaron.StaticOptions{
|
||||
SkipLogging: !setting.DisableRouterLog,
|
||||
},
|
||||
))
|
||||
m.Use(macaron.Static(
|
||||
setting.AvatarUploadPath,
|
||||
macaron.StaticOptions{
|
||||
Prefix: "avatars",
|
||||
SkipLogging: !setting.DisableRouterLog,
|
||||
},
|
||||
))
|
||||
m.Use(macaron.Renderer(macaron.RenderOptions{
|
||||
Directory: path.Join(setting.StaticRootPath, "templates"),
|
||||
Funcs: []template.FuncMap{base.TemplateFuncs},
|
||||
IndentJSON: macaron.Env != macaron.PROD,
|
||||
}))
|
||||
m.Use(i18n.I18n(i18n.Options{
|
||||
SubURL: setting.AppSubUrl,
|
||||
Directory: path.Join(setting.ConfRootPath, "locale"),
|
||||
CustomDirectory: path.Join(setting.CustomPath, "conf/locale"),
|
||||
Langs: setting.Langs,
|
||||
Names: setting.Names,
|
||||
Redirect: true,
|
||||
}))
|
||||
m.Use(cache.Cacher(cache.Options{
|
||||
Adapter: setting.CacheAdapter,
|
||||
Interval: setting.CacheInternal,
|
||||
Conn: setting.CacheConn,
|
||||
}))
|
||||
m.Use(captcha.Captchaer(captcha.Options{
|
||||
SubURL: setting.AppSubUrl,
|
||||
}))
|
||||
m.Use(session.Sessioner(session.Options{
|
||||
Provider: setting.SessionProvider,
|
||||
Config: *setting.SessionConfig,
|
||||
}))
|
||||
m.Use(csrf.Generate(csrf.Options{
|
||||
Secret: setting.SecretKey,
|
||||
SetCookie: true,
|
||||
Header: "X-Csrf-Token",
|
||||
CookiePath: setting.AppSubUrl,
|
||||
}))
|
||||
m.Use(toolbox.Toolboxer(m, toolbox.Options{
|
||||
HealthCheckFuncs: []*toolbox.HealthCheckFuncDesc{
|
||||
&toolbox.HealthCheckFuncDesc{
|
||||
Desc: "Database connection",
|
||||
Func: models.Ping,
|
||||
},
|
||||
},
|
||||
}))
|
||||
|
||||
// OAuth 2.
|
||||
if setting.OauthService != nil {
|
||||
for _, info := range setting.OauthService.OauthInfos {
|
||||
m.Use(oauth2.NewOAuth2Provider(info.Options, info.AuthUrl, info.TokenUrl))
|
||||
}
|
||||
}
|
||||
m.Use(middleware.Contexter())
|
||||
return m
|
||||
}
|
||||
|
||||
func runWeb(*cli.Context) {
|
||||
routers.GlobalInit()
|
||||
checkVersion()
|
||||
|
||||
m := newMacaron()
|
||||
|
||||
reqSignIn := middleware.Toggle(&middleware.ToggleOptions{SignInRequire: true})
|
||||
ignSignIn := middleware.Toggle(&middleware.ToggleOptions{SignInRequire: setting.Service.RequireSignInView})
|
||||
ignSignInAndCsrf := middleware.Toggle(&middleware.ToggleOptions{DisableCsrf: true})
|
||||
reqSignOut := middleware.Toggle(&middleware.ToggleOptions{SignOutRequire: true})
|
||||
|
||||
bind := binding.Bind
|
||||
bindIgnErr := binding.BindIgnErr
|
||||
|
||||
// Routers.
|
||||
m.Get("/", ignSignIn, routers.Home)
|
||||
m.Get("/explore", ignSignIn, routers.Explore)
|
||||
// FIXME: when i'm binding form here???
|
||||
m.Get("/install", bindIgnErr(auth.InstallForm{}), routers.Install)
|
||||
m.Post("/install", bindIgnErr(auth.InstallForm{}), routers.InstallPost)
|
||||
m.Group("", func() {
|
||||
m.Get("/pulls", user.Pulls)
|
||||
m.Get("/issues", user.Issues)
|
||||
}, reqSignIn)
|
||||
|
||||
// API.
|
||||
// FIXME: custom form error response.
|
||||
m.Group("/api", func() {
|
||||
m.Group("/v1", func() {
|
||||
// Miscellaneous.
|
||||
m.Post("/markdown", bindIgnErr(apiv1.MarkdownForm{}), v1.Markdown)
|
||||
m.Post("/markdown/raw", v1.MarkdownRaw)
|
||||
|
||||
// Users.
|
||||
m.Group("/users", func() {
|
||||
m.Get("/search", v1.SearchUsers)
|
||||
|
||||
m.Group("/:username", func() {
|
||||
m.Get("", v1.GetUserInfo)
|
||||
|
||||
m.Group("/tokens", func() {
|
||||
m.Combo("").Get(v1.ListAccessTokens).Post(bind(v1.CreateAccessTokenForm{}), v1.CreateAccessToken)
|
||||
}, middleware.ApiReqBasicAuth())
|
||||
})
|
||||
})
|
||||
|
||||
// Repositories.
|
||||
m.Combo("/user/repos", middleware.ApiReqToken()).Get(v1.ListMyRepos).Post(bind(api.CreateRepoOption{}), v1.CreateRepo)
|
||||
m.Post("/org/:org/repos", middleware.ApiReqToken(), bind(api.CreateRepoOption{}), v1.CreateOrgRepo)
|
||||
m.Group("/repos", func() {
|
||||
m.Get("/search", v1.SearchRepos)
|
||||
m.Post("/migrate", bindIgnErr(auth.MigrateRepoForm{}), v1.MigrateRepo)
|
||||
|
||||
m.Group("/:username/:reponame", func() {
|
||||
m.Combo("/hooks").Get(v1.ListRepoHooks).Post(bind(api.CreateHookOption{}), v1.CreateRepoHook)
|
||||
m.Patch("/hooks/:id:int", bind(api.EditHookOption{}), v1.EditRepoHook)
|
||||
m.Get("/raw/*", middleware.RepoRef(), v1.GetRepoRawFile)
|
||||
}, middleware.ApiRepoAssignment(), middleware.ApiReqToken())
|
||||
})
|
||||
|
||||
m.Any("/*", func(ctx *middleware.Context) {
|
||||
ctx.JSON(404, &base.ApiJsonErr{"Not Found", base.DOC_URL})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
// User.
|
||||
m.Group("/user", func() {
|
||||
m.Get("/login", user.SignIn)
|
||||
m.Post("/login", bindIgnErr(auth.SignInForm{}), user.SignInPost)
|
||||
m.Get("/info/:name", user.SocialSignIn)
|
||||
m.Get("/sign_up", user.SignUp)
|
||||
m.Post("/sign_up", bindIgnErr(auth.RegisterForm{}), user.SignUpPost)
|
||||
m.Get("/reset_password", user.ResetPasswd)
|
||||
m.Post("/reset_password", user.ResetPasswdPost)
|
||||
}, reqSignOut)
|
||||
m.Group("/user/settings", func() {
|
||||
m.Get("", user.Settings)
|
||||
m.Post("", bindIgnErr(auth.UpdateProfileForm{}), user.SettingsPost)
|
||||
m.Post("/avatar", binding.MultipartForm(auth.UploadAvatarForm{}), user.SettingsAvatar)
|
||||
m.Get("/password", user.SettingsPassword)
|
||||
m.Post("/password", bindIgnErr(auth.ChangePasswordForm{}), user.SettingsPasswordPost)
|
||||
m.Get("/ssh", user.SettingsSSHKeys)
|
||||
m.Post("/ssh", bindIgnErr(auth.AddSSHKeyForm{}), user.SettingsSSHKeysPost)
|
||||
m.Get("/social", user.SettingsSocial)
|
||||
m.Combo("/applications").Get(user.SettingsApplications).Post(bindIgnErr(auth.NewAccessTokenForm{}), user.SettingsApplicationsPost)
|
||||
m.Route("/delete", "GET,POST", user.SettingsDelete)
|
||||
}, reqSignIn)
|
||||
m.Group("/user", func() {
|
||||
// r.Get("/feeds", binding.Bind(auth.FeedsForm{}), user.Feeds)
|
||||
m.Any("/activate", user.Activate)
|
||||
m.Get("/email2user", user.Email2User)
|
||||
m.Get("/forget_password", user.ForgotPasswd)
|
||||
m.Post("/forget_password", user.ForgotPasswdPost)
|
||||
m.Get("/logout", user.SignOut)
|
||||
})
|
||||
|
||||
// Gravatar service.
|
||||
avt := avatar.CacheServer("public/img/avatar/", "public/img/avatar_default.jpg")
|
||||
os.MkdirAll("public/img/avatar/", os.ModePerm)
|
||||
m.Get("/avatar/:hash", avt.ServeHTTP)
|
||||
|
||||
adminReq := middleware.Toggle(&middleware.ToggleOptions{SignInRequire: true, AdminRequire: true})
|
||||
|
||||
m.Group("/admin", func() {
|
||||
m.Get("", adminReq, admin.Dashboard)
|
||||
m.Get("/config", admin.Config)
|
||||
m.Get("/monitor", admin.Monitor)
|
||||
|
||||
m.Group("/users", func() {
|
||||
m.Get("", admin.Users)
|
||||
m.Get("/new", admin.NewUser)
|
||||
m.Post("/new", bindIgnErr(auth.RegisterForm{}), admin.NewUserPost)
|
||||
m.Get("/:userid", admin.EditUser)
|
||||
m.Post("/:userid", bindIgnErr(auth.AdminEditUserForm{}), admin.EditUserPost)
|
||||
m.Post("/:userid/delete", admin.DeleteUser)
|
||||
})
|
||||
|
||||
m.Group("/orgs", func() {
|
||||
m.Get("", admin.Organizations)
|
||||
})
|
||||
|
||||
m.Group("/repos", func() {
|
||||
m.Get("", admin.Repositories)
|
||||
})
|
||||
|
||||
m.Group("/auths", func() {
|
||||
m.Get("", admin.Authentications)
|
||||
m.Get("/new", admin.NewAuthSource)
|
||||
m.Post("/new", bindIgnErr(auth.AuthenticationForm{}), admin.NewAuthSourcePost)
|
||||
m.Get("/:authid", admin.EditAuthSource)
|
||||
m.Post("/:authid", bindIgnErr(auth.AuthenticationForm{}), admin.EditAuthSourcePost)
|
||||
m.Post("/:authid/delete", admin.DeleteAuthSource)
|
||||
})
|
||||
|
||||
m.Group("/notices", func() {
|
||||
m.Get("", admin.Notices)
|
||||
m.Get("/:id:int/delete", admin.DeleteNotice)
|
||||
})
|
||||
}, adminReq)
|
||||
|
||||
m.Get("/:username", ignSignIn, user.Profile)
|
||||
|
||||
if macaron.Env == macaron.DEV {
|
||||
m.Get("/template/*", dev.TemplatePreview)
|
||||
}
|
||||
|
||||
reqTrueOwner := middleware.RequireTrueOwner()
|
||||
|
||||
// Organization.
|
||||
m.Group("/org", func() {
|
||||
m.Get("/create", org.Create)
|
||||
m.Post("/create", bindIgnErr(auth.CreateOrgForm{}), org.CreatePost)
|
||||
|
||||
m.Group("/:org", func() {
|
||||
m.Get("/dashboard", user.Dashboard)
|
||||
m.Get("/members", org.Members)
|
||||
m.Get("/members/action/:action", org.MembersAction)
|
||||
|
||||
m.Get("/teams", org.Teams)
|
||||
m.Get("/teams/:team", org.TeamMembers)
|
||||
m.Get("/teams/:team/repositories", org.TeamRepositories)
|
||||
m.Get("/teams/:team/action/:action", org.TeamsAction)
|
||||
m.Get("/teams/:team/action/repo/:action", org.TeamsRepoAction)
|
||||
}, middleware.OrgAssignment(true, true))
|
||||
|
||||
m.Group("/:org", func() {
|
||||
m.Get("/teams/new", org.NewTeam)
|
||||
m.Post("/teams/new", bindIgnErr(auth.CreateTeamForm{}), org.NewTeamPost)
|
||||
m.Get("/teams/:team/edit", org.EditTeam)
|
||||
m.Post("/teams/:team/edit", bindIgnErr(auth.CreateTeamForm{}), org.EditTeamPost)
|
||||
m.Post("/teams/:team/delete", org.DeleteTeam)
|
||||
|
||||
m.Group("/settings", func() {
|
||||
m.Get("", org.Settings)
|
||||
m.Post("", bindIgnErr(auth.UpdateOrgSettingForm{}), org.SettingsPost)
|
||||
m.Get("/hooks", org.SettingsHooks)
|
||||
m.Get("/hooks/new", repo.WebHooksNew)
|
||||
m.Post("/hooks/gogs/new", bindIgnErr(auth.NewWebhookForm{}), repo.WebHooksNewPost)
|
||||
m.Post("/hooks/slack/new", bindIgnErr(auth.NewSlackHookForm{}), repo.SlackHooksNewPost)
|
||||
m.Get("/hooks/:id", repo.WebHooksEdit)
|
||||
m.Post("/hooks/gogs/:id", bindIgnErr(auth.NewWebhookForm{}), repo.WebHooksEditPost)
|
||||
m.Post("/hooks/slack/:id", bindIgnErr(auth.NewSlackHookForm{}), repo.SlackHooksEditPost)
|
||||
m.Route("/delete", "GET,POST", org.SettingsDelete)
|
||||
})
|
||||
|
||||
m.Route("/invitations/new", "GET,POST", org.Invitation)
|
||||
}, middleware.OrgAssignment(true, true, true))
|
||||
}, reqSignIn)
|
||||
m.Group("/org", func() {
|
||||
m.Get("/:org", org.Home)
|
||||
}, middleware.OrgAssignment(true))
|
||||
|
||||
// Repository.
|
||||
m.Group("/repo", func() {
|
||||
m.Get("/create", repo.Create)
|
||||
m.Post("/create", bindIgnErr(auth.CreateRepoForm{}), repo.CreatePost)
|
||||
m.Get("/migrate", repo.Migrate)
|
||||
m.Post("/migrate", bindIgnErr(auth.MigrateRepoForm{}), repo.MigratePost)
|
||||
m.Get("/fork", repo.Fork)
|
||||
m.Post("/fork", bindIgnErr(auth.CreateRepoForm{}), repo.ForkPost)
|
||||
}, reqSignIn)
|
||||
|
||||
m.Group("/:username/:reponame", func() {
|
||||
m.Get("/settings", repo.Settings)
|
||||
m.Post("/settings", bindIgnErr(auth.RepoSettingForm{}), repo.SettingsPost)
|
||||
m.Group("/settings", func() {
|
||||
m.Route("/collaboration", "GET,POST", repo.SettingsCollaboration)
|
||||
m.Get("/hooks", repo.Webhooks)
|
||||
m.Get("/hooks/new", repo.WebHooksNew)
|
||||
m.Post("/hooks/gogs/new", bindIgnErr(auth.NewWebhookForm{}), repo.WebHooksNewPost)
|
||||
m.Post("/hooks/slack/new", bindIgnErr(auth.NewSlackHookForm{}), repo.SlackHooksNewPost)
|
||||
m.Get("/hooks/:id", repo.WebHooksEdit)
|
||||
m.Post("/hooks/gogs/:id", bindIgnErr(auth.NewWebhookForm{}), repo.WebHooksEditPost)
|
||||
m.Post("/hooks/slack/:id", bindIgnErr(auth.NewSlackHookForm{}), repo.SlackHooksEditPost)
|
||||
|
||||
m.Group("/hooks/git", func() {
|
||||
m.Get("", repo.GitHooks)
|
||||
m.Get("/:name", repo.GitHooksEdit)
|
||||
m.Post("/:name", repo.GitHooksEditPost)
|
||||
}, middleware.GitHookService())
|
||||
})
|
||||
}, reqSignIn, middleware.RepoAssignment(true), reqTrueOwner)
|
||||
|
||||
m.Group("/:username/:reponame", func() {
|
||||
m.Get("/action/:action", repo.Action)
|
||||
|
||||
m.Group("/issues", func() {
|
||||
m.Get("/new", repo.CreateIssue)
|
||||
m.Post("/new", bindIgnErr(auth.CreateIssueForm{}), repo.CreateIssuePost)
|
||||
m.Post("/:index", bindIgnErr(auth.CreateIssueForm{}), repo.UpdateIssue)
|
||||
m.Post("/:index/label", repo.UpdateIssueLabel)
|
||||
m.Post("/:index/milestone", repo.UpdateIssueMilestone)
|
||||
m.Post("/:index/assignee", repo.UpdateAssignee)
|
||||
m.Get("/:index/attachment/:id", repo.IssueGetAttachment)
|
||||
m.Post("/labels/new", bindIgnErr(auth.CreateLabelForm{}), repo.NewLabel)
|
||||
m.Post("/labels/edit", bindIgnErr(auth.CreateLabelForm{}), repo.UpdateLabel)
|
||||
m.Post("/labels/delete", repo.DeleteLabel)
|
||||
m.Get("/milestones/new", repo.NewMilestone)
|
||||
m.Post("/milestones/new", bindIgnErr(auth.CreateMilestoneForm{}), repo.NewMilestonePost)
|
||||
m.Get("/milestones/:index/edit", repo.UpdateMilestone)
|
||||
m.Post("/milestones/:index/edit", bindIgnErr(auth.CreateMilestoneForm{}), repo.UpdateMilestonePost)
|
||||
m.Get("/milestones/:index/:action", repo.UpdateMilestone)
|
||||
})
|
||||
|
||||
m.Post("/comment/:action", repo.Comment)
|
||||
|
||||
m.Group("/releases", func() {
|
||||
m.Get("/new", repo.NewRelease)
|
||||
m.Post("/new", bindIgnErr(auth.NewReleaseForm{}), repo.NewReleasePost)
|
||||
m.Get("/edit/:tagname", repo.EditRelease)
|
||||
m.Post("/edit/:tagname", bindIgnErr(auth.EditReleaseForm{}), repo.EditReleasePost)
|
||||
}, middleware.RepoRef())
|
||||
}, reqSignIn, middleware.RepoAssignment(true))
|
||||
|
||||
m.Group("/:username/:reponame", func() {
|
||||
m.Get("/releases", middleware.RepoRef(), repo.Releases)
|
||||
m.Get("/issues", repo.Issues)
|
||||
m.Get("/issues/:index", repo.ViewIssue)
|
||||
m.Get("/issues/milestones", repo.Milestones)
|
||||
m.Get("/pulls", repo.Pulls)
|
||||
m.Get("/branches", repo.Branches)
|
||||
m.Get("/archive/*", repo.Download)
|
||||
m.Get("/issues2/", repo.Issues2)
|
||||
m.Get("/pulls2/", repo.PullRequest2)
|
||||
m.Get("/labels2/", repo.Labels2)
|
||||
m.Get("/milestone2/", repo.Milestones2)
|
||||
|
||||
m.Group("", func() {
|
||||
m.Get("/src/*", repo.Home)
|
||||
m.Get("/raw/*", repo.SingleDownload)
|
||||
m.Get("/commits/*", repo.RefCommits)
|
||||
m.Get("/commit/*", repo.Diff)
|
||||
}, middleware.RepoRef())
|
||||
|
||||
m.Get("/compare/:before([a-z0-9]+)...:after([a-z0-9]+)", repo.CompareDiff)
|
||||
}, ignSignIn, middleware.RepoAssignment(true))
|
||||
|
||||
m.Group("/:username", func() {
|
||||
m.Get("/:reponame", ignSignIn, middleware.RepoAssignment(true, true), middleware.RepoRef(), repo.Home)
|
||||
m.Any("/:reponame/*", ignSignInAndCsrf, repo.Http)
|
||||
})
|
||||
|
||||
// robots.txt
|
||||
m.Get("/robots.txt", func(ctx *middleware.Context) {
|
||||
if setting.HasRobotsTxt {
|
||||
ctx.ServeFile(path.Join(setting.CustomPath, "robots.txt"))
|
||||
} else {
|
||||
ctx.Error(404)
|
||||
}
|
||||
})
|
||||
|
||||
// Not found handler.
|
||||
m.NotFound(routers.NotFound)
|
||||
|
||||
var err error
|
||||
listenAddr := fmt.Sprintf("%s:%s", setting.HttpAddr, setting.HttpPort)
|
||||
log.Info("Listen: %v://%s%s", setting.Protocol, listenAddr, setting.AppSubUrl)
|
||||
switch setting.Protocol {
|
||||
case setting.HTTP:
|
||||
err = http.ListenAndServe(listenAddr, m)
|
||||
case setting.HTTPS:
|
||||
server := &http.Server{Addr: listenAddr, TLSConfig: &tls.Config{MinVersion: tls.VersionTLS10}, Handler: m}
|
||||
err = server.ListenAndServeTLS(setting.CertFile, setting.KeyFile)
|
||||
case setting.FCGI:
|
||||
err = fcgi.Serve(nil, m)
|
||||
default:
|
||||
log.Fatal(4, "Invalid protocol: %s", setting.Protocol)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
log.Fatal(4, "Fail to start server: %v", err)
|
||||
}
|
||||
}
|
||||
153
conf/app.ini
153
conf/app.ini
@@ -1,30 +1,41 @@
|
||||
; App name that shows on every page title
|
||||
APP_NAME = Gogs: Go Git Service
|
||||
APP_LOGO = img/favicon.png
|
||||
; Change it if you run locally
|
||||
RUN_USER = git
|
||||
; Either "dev", "prod" or "test", default is "dev"
|
||||
RUN_MODE = dev
|
||||
|
||||
[repository]
|
||||
ROOT =
|
||||
ROOT =
|
||||
SCRIPT_TYPE = bash
|
||||
LANG_IGNS = Google Go|C|C++|Python|Ruby|C Sharp|Java|Objective-C|Android
|
||||
LICENSES = Apache v2 License|GPL v2|MIT License|Affero GPL|Artistic License 2.0|BSD (3-Clause) License
|
||||
|
||||
[server]
|
||||
PROTOCOL = http
|
||||
DOMAIN = localhost
|
||||
ROOT_URL = %(PROTOCOL)s://%(DOMAIN)s:%(HTTP_PORT)s/
|
||||
HTTP_ADDR =
|
||||
HTTP_PORT = 3000
|
||||
SSH_PORT = 22
|
||||
; Disable CDN even in "prod" mode
|
||||
OFFLINE_MODE = false
|
||||
HTTP_ADDR =
|
||||
HTTP_PORT = 3000
|
||||
DISABLE_ROUTER_LOG = false
|
||||
; Generate steps:
|
||||
; $ cd path/to/gogs/custom/https
|
||||
; $ go run $GOROOT/src/pkg/crypto/tls/generate_cert.go -ca=true -duration=8760h0m0s -host=myhost.example.com
|
||||
; $ ./gogs cert -ca=true -duration=8760h0m0s -host=myhost.example.com
|
||||
;
|
||||
; Or from a .pfx file exported from the Windows certificate store (do
|
||||
; not forget to export the private key):
|
||||
; $ openssl pkcs12 -in cert.pfx -out cert.pem -nokeys
|
||||
; $ openssl pkcs12 -in cert.pfx -out key.pem -nocerts -nodes
|
||||
CERT_FILE = custom/https/cert.pem
|
||||
KEY_FILE = custom/https/key.pem
|
||||
; Upper level of template and static file path
|
||||
; default is the path where Gogs is executed
|
||||
STATIC_ROOT_PATH =
|
||||
; Application level GZIP support
|
||||
ENABLE_GZIP = false
|
||||
; Landing page for non-logged users, can be "home" or "explore"
|
||||
LANDING_PAGE = home
|
||||
|
||||
[database]
|
||||
; Either "mysql", "postgres" or "sqlite3", it's your choice
|
||||
@@ -48,6 +59,8 @@ SECRET_KEY = !#@FDEWREWR&*(
|
||||
LOGIN_REMEMBER_DAYS = 7
|
||||
COOKIE_USERNAME = gogs_awesome
|
||||
COOKIE_REMEMBER_NAME = gogs_incredible
|
||||
; Reverse proxy authentication header name of user name
|
||||
REVERSE_PROXY_AUTHENTICATION_USER = X-WEBAUTH-USER
|
||||
|
||||
[service]
|
||||
ACTIVE_CODE_LIVE_MINUTES = 180
|
||||
@@ -62,6 +75,15 @@ REQUIRE_SIGNIN_VIEW = false
|
||||
ENABLE_CACHE_AVATAR = false
|
||||
; Mail notification
|
||||
ENABLE_NOTIFY_MAIL = false
|
||||
; More detail: https://github.com/gogits/gogs/issues/165
|
||||
ENABLE_REVERSE_PROXY_AUTHENTICATION = false
|
||||
ENABLE_REVERSE_PROXY_AUTO_REGISTERATION = false
|
||||
|
||||
[webhook]
|
||||
; Cron task interval in minutes
|
||||
TASK_INTERVAL = 1
|
||||
; Deliver timeout in seconds
|
||||
DELIVER_TIMEOUT = 5
|
||||
|
||||
[mailer]
|
||||
ENABLED = false
|
||||
@@ -72,20 +94,20 @@ SUBJECT = %(APP_NAME)s
|
||||
; Mail server
|
||||
; Gmail: smtp.gmail.com:587
|
||||
; QQ: smtp.qq.com:25
|
||||
HOST =
|
||||
HOST =
|
||||
; Mail from address
|
||||
FROM =
|
||||
FROM =
|
||||
; Mailer user name and password
|
||||
USER =
|
||||
PASSWD =
|
||||
USER =
|
||||
PASSWD =
|
||||
|
||||
[oauth]
|
||||
ENABLED = false
|
||||
|
||||
[oauth.github]
|
||||
ENABLED = false
|
||||
CLIENT_ID =
|
||||
CLIENT_SECRET =
|
||||
CLIENT_ID =
|
||||
CLIENT_SECRET =
|
||||
SCOPES = https://api.github.com/user
|
||||
AUTH_URL = https://github.com/login/oauth/authorize
|
||||
TOKEN_URL = https://github.com/login/oauth/access_token
|
||||
@@ -94,36 +116,25 @@ TOKEN_URL = https://github.com/login/oauth/access_token
|
||||
; https://console.developers.google.com/project
|
||||
[oauth.google]
|
||||
ENABLED = false
|
||||
CLIENT_ID =
|
||||
CLIENT_SECRET =
|
||||
CLIENT_ID =
|
||||
CLIENT_SECRET =
|
||||
SCOPES = https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile
|
||||
AUTH_URL = https://accounts.google.com/o/oauth2/auth
|
||||
TOKEN_URL = https://accounts.google.com/o/oauth2/token
|
||||
|
||||
[oauth.qq]
|
||||
ENABLED = false
|
||||
CLIENT_ID =
|
||||
CLIENT_SECRET =
|
||||
SCOPES = all
|
||||
CLIENT_ID =
|
||||
CLIENT_SECRET =
|
||||
SCOPES = get_user_info
|
||||
; QQ 互联
|
||||
; AUTH_URL = https://graph.qq.com/oauth2.0/authorize
|
||||
; TOKEN_URL = https://graph.qq.com/oauth2.0/token
|
||||
; Tencent weibo
|
||||
AUTH_URL = https://open.t.qq.com/cgi-bin/oauth2/authorize
|
||||
TOKEN_URL = https://open.t.qq.com/cgi-bin/oauth2/access_token
|
||||
|
||||
[oauth.twitter]
|
||||
ENABLED = false
|
||||
CLIENT_ID =
|
||||
CLIENT_SECRET =
|
||||
SCOPES = all
|
||||
AUTH_URL = https://api.twitter.com/oauth/authorize
|
||||
TOKEN_URL = https://api.twitter.com/oauth/access_token
|
||||
AUTH_URL = https://graph.qq.com/oauth2.0/authorize
|
||||
TOKEN_URL = https://graph.qq.com/oauth2.0/token
|
||||
|
||||
[oauth.weibo]
|
||||
ENABLED = false
|
||||
CLIENT_ID =
|
||||
CLIENT_SECRET =
|
||||
CLIENT_ID =
|
||||
CLIENT_SECRET =
|
||||
SCOPES = all
|
||||
AUTH_URL = https://api.weibo.com/oauth2/authorize
|
||||
TOKEN_URL = https://api.weibo.com/oauth2/access_token
|
||||
@@ -134,8 +145,8 @@ ADAPTER = memory
|
||||
; For "memory" only, GC interval in seconds, default is 60
|
||||
INTERVAL = 60
|
||||
; For "redis" and "memcache", connection host address
|
||||
; redis: ":6039"
|
||||
; memcache: "127.0.0.1:11211"
|
||||
; redis: `:6039`
|
||||
; memcache: `127.0.0.1:11211`
|
||||
HOST =
|
||||
|
||||
[session]
|
||||
@@ -143,9 +154,9 @@ HOST =
|
||||
PROVIDER = file
|
||||
; Provider config options
|
||||
; memory: not have any config yet
|
||||
; file: session file path, e.g. data/sessions
|
||||
; redis: config like redis server addr, poolSize, password, e.g. 127.0.0.1:6379,100,astaxie
|
||||
; mysql: go-sql-driver/mysql dsn config string, e.g. root:password@/session_table
|
||||
; file: session file path, e.g. `data/sessions`
|
||||
; redis: config like redis server addr, poolSize, password, e.g. `127.0.0.1:6379,100,gogs`
|
||||
; mysql: go-sql-driver/mysql dsn config string, e.g. `root:password@/session_table`
|
||||
PROVIDER_CONFIG = data/sessions
|
||||
; Session cookie name
|
||||
COOKIE_NAME = i_like_gogits
|
||||
@@ -157,17 +168,37 @@ ENABLE_SET_COOKIE = true
|
||||
GC_INTERVAL_TIME = 86400
|
||||
; Session life time, default is 86400
|
||||
SESSION_LIFE_TIME = 86400
|
||||
; session id hash func, Either "sha1", "sha256" or "md5" default is sha1
|
||||
SESSION_ID_HASHFUNC = sha1
|
||||
; Session hash key, default is use random string
|
||||
SESSION_ID_HASHKEY =
|
||||
|
||||
[picture]
|
||||
; The place to picture data, either "server" or "qiniu", default is "server"
|
||||
SERVICE = server
|
||||
AVATAR_UPLOAD_PATH = data/avatars
|
||||
; Chinese users can choose "duoshuo"
|
||||
GRAVATAR_SOURCE = gravatar
|
||||
DISABLE_GRAVATAR = false
|
||||
|
||||
[attachment]
|
||||
; Whether attachments are enabled. Defaults to `true`
|
||||
ENABLE = true
|
||||
; Path for attachments. Defaults to `data/attachments`
|
||||
PATH = data/attachments
|
||||
; One or more allowed types, e.g. image/jpeg|image/png
|
||||
ALLOWED_TYPES = image/jpeg|image/png
|
||||
; Max size of each file. Defaults to 32MB
|
||||
MAX_SIZE = 32
|
||||
; Max number of files per upload. Defaults to 10
|
||||
MAX_FILES = 10
|
||||
|
||||
[time]
|
||||
; Specifies the format for fully outputed dates. Defaults to RFC1123
|
||||
; Special supported values are ANSIC, UnixDate, RubyDate, RFC822, RFC822Z, RFC850, RFC1123, RFC1123Z, RFC3339, RFC3339Nano, Kitchen, Stamp, StampMilli, StampMicro and StampNano
|
||||
; For more information about the format see http://golang.org/pkg/time/#pkg-constants
|
||||
FORMAT =
|
||||
|
||||
[log]
|
||||
ROOT_PATH =
|
||||
; Either "console", "file", "conn", "smtp" or "database", default is "console"
|
||||
; Use comma to separate multiple modes, e.g. "console, file"
|
||||
MODE = console
|
||||
; Buffer length of channel, keep it as it is if you don't know what it is.
|
||||
BUFFER_LEN = 10000
|
||||
@@ -176,12 +207,11 @@ LEVEL = Trace
|
||||
|
||||
; For "console" mode only
|
||||
[log.console]
|
||||
LEVEL =
|
||||
LEVEL =
|
||||
|
||||
; For "file" mode only
|
||||
[log.file]
|
||||
LEVEL =
|
||||
FILE_NAME = log/gogs.log
|
||||
LEVEL =
|
||||
; This enables automated log rotate(switch of following options), default is true
|
||||
LOG_ROTATE = true
|
||||
; Max line number of single file, default is 1000000
|
||||
@@ -195,7 +225,7 @@ MAX_DAYS = 7
|
||||
|
||||
; For "conn" mode only
|
||||
[log.conn]
|
||||
LEVEL =
|
||||
LEVEL =
|
||||
; Reconnect host for every single message, default is false
|
||||
RECONNECT_ON_MSG = false
|
||||
; Try to reconnect when connection is lost, default is false
|
||||
@@ -203,23 +233,38 @@ RECONNECT = false
|
||||
; Either "tcp", "unix" or "udp", default is "tcp"
|
||||
PROTOCOL = tcp
|
||||
; Host address
|
||||
ADDR =
|
||||
ADDR =
|
||||
|
||||
; For "smtp" mode only
|
||||
[log.smtp]
|
||||
LEVEL =
|
||||
LEVEL =
|
||||
; Name displayed in mail title, default is "Diagnostic message from serve"
|
||||
SUBJECT = Diagnostic message from serve
|
||||
; Mail server
|
||||
HOST =
|
||||
HOST =
|
||||
; Mailer user name and password
|
||||
USER =
|
||||
USER =
|
||||
PASSWD =
|
||||
; Receivers, can be one or more, e.g. ["1@example.com","2@example.com"]
|
||||
RECEIVERS =
|
||||
RECEIVERS =
|
||||
|
||||
; For "database" mode only
|
||||
[log.database]
|
||||
LEVEL =
|
||||
Driver =
|
||||
CONN =
|
||||
LEVEL =
|
||||
; Either "mysql" or "postgres"
|
||||
DRIVER =
|
||||
; Based on xorm, e.g.: root:root@localhost/gogs?charset=utf8
|
||||
CONN =
|
||||
|
||||
[git]
|
||||
MAX_GITDIFF_LINES = 10000
|
||||
; Arguments for command 'git fsck', e.g.: "--unreachable --tags"
|
||||
; see more on http://git-scm.com/docs/git-fsck/1.7.5
|
||||
FSCK_ARGS =
|
||||
; Arguments for command 'git gc', e.g.: "--aggressive --auto"
|
||||
; see more on http://git-scm.com/docs/git-gc/1.7.5
|
||||
GC_ARGS =
|
||||
|
||||
[i18n]
|
||||
LANGS = en-US,zh-CN,zh-HK,de-DE,fr-CA,nl-NL,lv-LV
|
||||
NAMES = English,简体中文,繁體中文,Deutsch,Français,Nederlands,Latviešu
|
||||
|
||||
@@ -59,7 +59,7 @@ _ReSharper*
|
||||
*.ncrunch*
|
||||
.*crunch*.local.xml
|
||||
|
||||
# Installshield output folder
|
||||
# Installshield output folder
|
||||
[Ee]xpress
|
||||
|
||||
# DocProject is a documentation generator add-in
|
||||
|
||||
23
conf/license/BSD license
Normal file
23
conf/license/BSD license
Normal file
@@ -0,0 +1,23 @@
|
||||
Copyright (c) 2014
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
116
conf/license/CC0 1.0 Universal
Normal file
116
conf/license/CC0 1.0 Universal
Normal file
@@ -0,0 +1,116 @@
|
||||
CC0 1.0 Universal
|
||||
|
||||
Statement of Purpose
|
||||
|
||||
The laws of most jurisdictions throughout the world automatically confer
|
||||
exclusive Copyright and Related Rights (defined below) upon the creator and
|
||||
subsequent owner(s) (each and all, an "owner") of an original work of
|
||||
authorship and/or a database (each, a "Work").
|
||||
|
||||
Certain owners wish to permanently relinquish those rights to a Work for the
|
||||
purpose of contributing to a commons of creative, cultural and scientific
|
||||
works ("Commons") that the public can reliably and without fear of later
|
||||
claims of infringement build upon, modify, incorporate in other works, reuse
|
||||
and redistribute as freely as possible in any form whatsoever and for any
|
||||
purposes, including without limitation commercial purposes. These owners may
|
||||
contribute to the Commons to promote the ideal of a free culture and the
|
||||
further production of creative, cultural and scientific works, or to gain
|
||||
reputation or greater distribution for their Work in part through the use and
|
||||
efforts of others.
|
||||
|
||||
For these and/or other purposes and motivations, and without any expectation
|
||||
of additional consideration or compensation, the person associating CC0 with a
|
||||
Work (the "Affirmer"), to the extent that he or she is an owner of Copyright
|
||||
and Related Rights in the Work, voluntarily elects to apply CC0 to the Work
|
||||
and publicly distribute the Work under its terms, with knowledge of his or her
|
||||
Copyright and Related Rights in the Work and the meaning and intended legal
|
||||
effect of CC0 on those rights.
|
||||
|
||||
1. Copyright and Related Rights. A Work made available under CC0 may be
|
||||
protected by copyright and related or neighboring rights ("Copyright and
|
||||
Related Rights"). Copyright and Related Rights include, but are not limited
|
||||
to, the following:
|
||||
|
||||
i. the right to reproduce, adapt, distribute, perform, display, communicate,
|
||||
and translate a Work;
|
||||
|
||||
ii. moral rights retained by the original author(s) and/or performer(s);
|
||||
|
||||
iii. publicity and privacy rights pertaining to a person's image or likeness
|
||||
depicted in a Work;
|
||||
|
||||
iv. rights protecting against unfair competition in regards to a Work,
|
||||
subject to the limitations in paragraph 4(a), below;
|
||||
|
||||
v. rights protecting the extraction, dissemination, use and reuse of data in
|
||||
a Work;
|
||||
|
||||
vi. database rights (such as those arising under Directive 96/9/EC of the
|
||||
European Parliament and of the Council of 11 March 1996 on the legal
|
||||
protection of databases, and under any national implementation thereof,
|
||||
including any amended or successor version of such directive); and
|
||||
|
||||
vii. other similar, equivalent or corresponding rights throughout the world
|
||||
based on applicable law or treaty, and any national implementations thereof.
|
||||
|
||||
2. Waiver. To the greatest extent permitted by, but not in contravention of,
|
||||
applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and
|
||||
unconditionally waives, abandons, and surrenders all of Affirmer's Copyright
|
||||
and Related Rights and associated claims and causes of action, whether now
|
||||
known or unknown (including existing as well as future claims and causes of
|
||||
action), in the Work (i) in all territories worldwide, (ii) for the maximum
|
||||
duration provided by applicable law or treaty (including future time
|
||||
extensions), (iii) in any current or future medium and for any number of
|
||||
copies, and (iv) for any purpose whatsoever, including without limitation
|
||||
commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes
|
||||
the Waiver for the benefit of each member of the public at large and to the
|
||||
detriment of Affirmer's heirs and successors, fully intending that such Waiver
|
||||
shall not be subject to revocation, rescission, cancellation, termination, or
|
||||
any other legal or equitable action to disrupt the quiet enjoyment of the Work
|
||||
by the public as contemplated by Affirmer's express Statement of Purpose.
|
||||
|
||||
3. Public License Fallback. Should any part of the Waiver for any reason be
|
||||
judged legally invalid or ineffective under applicable law, then the Waiver
|
||||
shall be preserved to the maximum extent permitted taking into account
|
||||
Affirmer's express Statement of Purpose. In addition, to the extent the Waiver
|
||||
is so judged Affirmer hereby grants to each affected person a royalty-free,
|
||||
non transferable, non sublicensable, non exclusive, irrevocable and
|
||||
unconditional license to exercise Affirmer's Copyright and Related Rights in
|
||||
the Work (i) in all territories worldwide, (ii) for the maximum duration
|
||||
provided by applicable law or treaty (including future time extensions), (iii)
|
||||
in any current or future medium and for any number of copies, and (iv) for any
|
||||
purpose whatsoever, including without limitation commercial, advertising or
|
||||
promotional purposes (the "License"). The License shall be deemed effective as
|
||||
of the date CC0 was applied by Affirmer to the Work. Should any part of the
|
||||
License for any reason be judged legally invalid or ineffective under
|
||||
applicable law, such partial invalidity or ineffectiveness shall not
|
||||
invalidate the remainder of the License, and in such case Affirmer hereby
|
||||
affirms that he or she will not (i) exercise any of his or her remaining
|
||||
Copyright and Related Rights in the Work or (ii) assert any associated claims
|
||||
and causes of action with respect to the Work, in either case contrary to
|
||||
Affirmer's express Statement of Purpose.
|
||||
|
||||
4. Limitations and Disclaimers.
|
||||
|
||||
a. No trademark or patent rights held by Affirmer are waived, abandoned,
|
||||
surrendered, licensed or otherwise affected by this document.
|
||||
|
||||
b. Affirmer offers the Work as-is and makes no representations or warranties
|
||||
of any kind concerning the Work, express, implied, statutory or otherwise,
|
||||
including without limitation warranties of title, merchantability, fitness
|
||||
for a particular purpose, non infringement, or the absence of latent or
|
||||
other defects, accuracy, or the present or absence of errors, whether or not
|
||||
discoverable, all to the greatest extent permissible under applicable law.
|
||||
|
||||
c. Affirmer disclaims responsibility for clearing rights of other persons
|
||||
that may apply to the Work or any use thereof, including without limitation
|
||||
any person's Copyright and Related Rights in the Work. Further, Affirmer
|
||||
disclaims responsibility for obtaining any necessary consents, permissions
|
||||
or other rights required for any use of the Work.
|
||||
|
||||
d. Affirmer understands and acknowledges that Creative Commons is not a
|
||||
party to this document and has no duty or obligation with respect to this
|
||||
CC0 or use of the Work.
|
||||
|
||||
For more information, please see
|
||||
<http://creativecommons.org/publicdomain/zero/1.0/>
|
||||
203
conf/license/Eclipse Public License v1.0
Normal file
203
conf/license/Eclipse Public License v1.0
Normal file
@@ -0,0 +1,203 @@
|
||||
Eclipse Public License - v 1.0
|
||||
|
||||
THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
|
||||
LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM
|
||||
CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
|
||||
|
||||
1. DEFINITIONS
|
||||
|
||||
"Contribution" means:
|
||||
|
||||
a) in the case of the initial Contributor, the initial code and documentation
|
||||
distributed under this Agreement, and
|
||||
b) in the case of each subsequent Contributor:
|
||||
i) changes to the Program, and
|
||||
ii) additions to the Program;
|
||||
|
||||
where such changes and/or additions to the Program originate from and are
|
||||
distributed by that particular Contributor. A Contribution 'originates'
|
||||
from a Contributor if it was added to the Program by such Contributor
|
||||
itself or anyone acting on such Contributor's behalf. Contributions do not
|
||||
include additions to the Program which: (i) are separate modules of
|
||||
software distributed in conjunction with the Program under their own
|
||||
license agreement, and (ii) are not derivative works of the Program.
|
||||
|
||||
"Contributor" means any person or entity that distributes the Program.
|
||||
|
||||
"Licensed Patents" mean patent claims licensable by a Contributor which are
|
||||
necessarily infringed by the use or sale of its Contribution alone or when
|
||||
combined with the Program.
|
||||
|
||||
"Program" means the Contributions distributed in accordance with this
|
||||
Agreement.
|
||||
|
||||
"Recipient" means anyone who receives the Program under this Agreement,
|
||||
including all Contributors.
|
||||
|
||||
2. GRANT OF RIGHTS
|
||||
a) Subject to the terms of this Agreement, each Contributor hereby grants
|
||||
Recipient a non-exclusive, worldwide, royalty-free copyright license to
|
||||
reproduce, prepare derivative works of, publicly display, publicly
|
||||
perform, distribute and sublicense the Contribution of such Contributor,
|
||||
if any, and such derivative works, in source code and object code form.
|
||||
b) Subject to the terms of this Agreement, each Contributor hereby grants
|
||||
Recipient a non-exclusive, worldwide, royalty-free patent license under
|
||||
Licensed Patents to make, use, sell, offer to sell, import and otherwise
|
||||
transfer the Contribution of such Contributor, if any, in source code and
|
||||
object code form. This patent license shall apply to the combination of
|
||||
the Contribution and the Program if, at the time the Contribution is
|
||||
added by the Contributor, such addition of the Contribution causes such
|
||||
combination to be covered by the Licensed Patents. The patent license
|
||||
shall not apply to any other combinations which include the Contribution.
|
||||
No hardware per se is licensed hereunder.
|
||||
c) Recipient understands that although each Contributor grants the licenses
|
||||
to its Contributions set forth herein, no assurances are provided by any
|
||||
Contributor that the Program does not infringe the patent or other
|
||||
intellectual property rights of any other entity. Each Contributor
|
||||
disclaims any liability to Recipient for claims brought by any other
|
||||
entity based on infringement of intellectual property rights or
|
||||
otherwise. As a condition to exercising the rights and licenses granted
|
||||
hereunder, each Recipient hereby assumes sole responsibility to secure
|
||||
any other intellectual property rights needed, if any. For example, if a
|
||||
third party patent license is required to allow Recipient to distribute
|
||||
the Program, it is Recipient's responsibility to acquire that license
|
||||
before distributing the Program.
|
||||
d) Each Contributor represents that to its knowledge it has sufficient
|
||||
copyright rights in its Contribution, if any, to grant the copyright
|
||||
license set forth in this Agreement.
|
||||
|
||||
3. REQUIREMENTS
|
||||
|
||||
A Contributor may choose to distribute the Program in object code form under
|
||||
its own license agreement, provided that:
|
||||
|
||||
a) it complies with the terms and conditions of this Agreement; and
|
||||
b) its license agreement:
|
||||
i) effectively disclaims on behalf of all Contributors all warranties
|
||||
and conditions, express and implied, including warranties or
|
||||
conditions of title and non-infringement, and implied warranties or
|
||||
conditions of merchantability and fitness for a particular purpose;
|
||||
ii) effectively excludes on behalf of all Contributors all liability for
|
||||
damages, including direct, indirect, special, incidental and
|
||||
consequential damages, such as lost profits;
|
||||
iii) states that any provisions which differ from this Agreement are
|
||||
offered by that Contributor alone and not by any other party; and
|
||||
iv) states that source code for the Program is available from such
|
||||
Contributor, and informs licensees how to obtain it in a reasonable
|
||||
manner on or through a medium customarily used for software exchange.
|
||||
|
||||
When the Program is made available in source code form:
|
||||
|
||||
a) it must be made available under this Agreement; and
|
||||
b) a copy of this Agreement must be included with each copy of the Program.
|
||||
Contributors may not remove or alter any copyright notices contained
|
||||
within the Program.
|
||||
|
||||
Each Contributor must identify itself as the originator of its Contribution,
|
||||
if
|
||||
any, in a manner that reasonably allows subsequent Recipients to identify the
|
||||
originator of the Contribution.
|
||||
|
||||
4. COMMERCIAL DISTRIBUTION
|
||||
|
||||
Commercial distributors of software may accept certain responsibilities with
|
||||
respect to end users, business partners and the like. While this license is
|
||||
intended to facilitate the commercial use of the Program, the Contributor who
|
||||
includes the Program in a commercial product offering should do so in a manner
|
||||
which does not create potential liability for other Contributors. Therefore,
|
||||
if a Contributor includes the Program in a commercial product offering, such
|
||||
Contributor ("Commercial Contributor") hereby agrees to defend and indemnify
|
||||
every other Contributor ("Indemnified Contributor") against any losses,
|
||||
damages and costs (collectively "Losses") arising from claims, lawsuits and
|
||||
other legal actions brought by a third party against the Indemnified
|
||||
Contributor to the extent caused by the acts or omissions of such Commercial
|
||||
Contributor in connection with its distribution of the Program in a commercial
|
||||
product offering. The obligations in this section do not apply to any claims
|
||||
or Losses relating to any actual or alleged intellectual property
|
||||
infringement. In order to qualify, an Indemnified Contributor must:
|
||||
a) promptly notify the Commercial Contributor in writing of such claim, and
|
||||
b) allow the Commercial Contributor to control, and cooperate with the
|
||||
Commercial Contributor in, the defense and any related settlement
|
||||
negotiations. The Indemnified Contributor may participate in any such claim at
|
||||
its own expense.
|
||||
|
||||
For example, a Contributor might include the Program in a commercial product
|
||||
offering, Product X. That Contributor is then a Commercial Contributor. If
|
||||
that Commercial Contributor then makes performance claims, or offers
|
||||
warranties related to Product X, those performance claims and warranties are
|
||||
such Commercial Contributor's responsibility alone. Under this section, the
|
||||
Commercial Contributor would have to defend claims against the other
|
||||
Contributors related to those performance claims and warranties, and if a
|
||||
court requires any other Contributor to pay any damages as a result, the
|
||||
Commercial Contributor must pay those damages.
|
||||
|
||||
5. NO WARRANTY
|
||||
|
||||
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
|
||||
IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE,
|
||||
NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each
|
||||
Recipient is solely responsible for determining the appropriateness of using
|
||||
and distributing the Program and assumes all risks associated with its
|
||||
exercise of rights under this Agreement , including but not limited to the
|
||||
risks and costs of program errors, compliance with applicable laws, damage to
|
||||
or loss of data, programs or equipment, and unavailability or interruption of
|
||||
operations.
|
||||
|
||||
6. DISCLAIMER OF LIABILITY
|
||||
|
||||
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY
|
||||
CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION
|
||||
LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE
|
||||
EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY
|
||||
OF SUCH DAMAGES.
|
||||
|
||||
7. GENERAL
|
||||
|
||||
If any provision of this Agreement is invalid or unenforceable under
|
||||
applicable law, it shall not affect the validity or enforceability of the
|
||||
remainder of the terms of this Agreement, and without further action by the
|
||||
parties hereto, such provision shall be reformed to the minimum extent
|
||||
necessary to make such provision valid and enforceable.
|
||||
|
||||
If Recipient institutes patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Program itself
|
||||
(excluding combinations of the Program with other software or hardware)
|
||||
infringes such Recipient's patent(s), then such Recipient's rights granted
|
||||
under Section 2(b) shall terminate as of the date such litigation is filed.
|
||||
|
||||
All Recipient's rights under this Agreement shall terminate if it fails to
|
||||
comply with any of the material terms or conditions of this Agreement and does
|
||||
not cure such failure in a reasonable period of time after becoming aware of
|
||||
such noncompliance. If all Recipient's rights under this Agreement terminate,
|
||||
Recipient agrees to cease use and distribution of the Program as soon as
|
||||
reasonably practicable. However, Recipient's obligations under this Agreement
|
||||
and any licenses granted by Recipient relating to the Program shall continue
|
||||
and survive.
|
||||
|
||||
Everyone is permitted to copy and distribute copies of this Agreement, but in
|
||||
order to avoid inconsistency the Agreement is copyrighted and may only be
|
||||
modified in the following manner. The Agreement Steward reserves the right to
|
||||
publish new versions (including revisions) of this Agreement from time to
|
||||
time. No one other than the Agreement Steward has the right to modify this
|
||||
Agreement. The Eclipse Foundation is the initial Agreement Steward. The
|
||||
Eclipse Foundation may assign the responsibility to serve as the Agreement
|
||||
Steward to a suitable separate entity. Each new version of the Agreement will
|
||||
be given a distinguishing version number. The Program (including
|
||||
Contributions) may always be distributed subject to the version of the
|
||||
Agreement under which it was received. In addition, after a new version of the
|
||||
Agreement is published, Contributor may elect to distribute the Program
|
||||
(including its Contributions) under the new version. Except as expressly
|
||||
stated in Sections 2(a) and 2(b) above, Recipient receives no rights or
|
||||
licenses to the intellectual property of any Contributor under this Agreement,
|
||||
whether expressly, by implication, estoppel or otherwise. All rights in the
|
||||
Program not expressly granted under this Agreement are reserved.
|
||||
|
||||
This Agreement is governed by the laws of the State of New York and the
|
||||
intellectual property laws of the United States of America. No party to this
|
||||
Agreement will bring a legal action under this Agreement more than one year
|
||||
after the cause of action arose. Each party waives its rights to a jury trial in
|
||||
any resulting litigation.
|
||||
674
conf/license/GPL v3
Normal file
674
conf/license/GPL v3
Normal file
@@ -0,0 +1,674 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
{one line to give the program's name and a brief idea of what it does.}
|
||||
Copyright (C) {year} {name of author}
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
{project} Copyright (C) {year} {fullname}
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
13
conf/license/ISC license
Normal file
13
conf/license/ISC license
Normal file
@@ -0,0 +1,13 @@
|
||||
Copyright (c) 2014
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
504
conf/license/LGPL v2.1
Normal file
504
conf/license/LGPL v2.1
Normal file
@@ -0,0 +1,504 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
(This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.)
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some
|
||||
specially designated software packages--typically libraries--of the
|
||||
Free Software Foundation and other authors who decide to use it. You
|
||||
can use it too, but we suggest you first think carefully about whether
|
||||
this license or the ordinary General Public License is the better
|
||||
strategy to use in any particular case, based on the explanations below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use,
|
||||
not price. Our General Public Licenses are designed to make sure that
|
||||
you have the freedom to distribute copies of free software (and charge
|
||||
for this service if you wish); that you receive source code or can get
|
||||
it if you want it; that you can change the software and use pieces of
|
||||
it in new free programs; and that you are informed that you can do
|
||||
these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
distributors to deny you these rights or to ask you to surrender these
|
||||
rights. These restrictions translate to certain responsibilities for
|
||||
you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link other code with the library, you must provide
|
||||
complete object files to the recipients, so that they can relink them
|
||||
with the library after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the
|
||||
library, and (2) we offer you this license, which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that
|
||||
there is no warranty for the free library. Also, if the library is
|
||||
modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
restrictive license from a patent holder. Therefore, we insist that
|
||||
any patent license obtained for a version of the library must be
|
||||
consistent with the full freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the
|
||||
ordinary GNU General Public License. This license, the GNU Lesser
|
||||
General Public License, applies to certain designated libraries, and
|
||||
is quite different from the ordinary General Public License. We use
|
||||
this license for certain libraries in order to permit linking those
|
||||
libraries into non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using
|
||||
a shared library, the combination of the two is legally speaking a
|
||||
combined work, a derivative of the original library. The ordinary
|
||||
General Public License therefore permits such linking only if the
|
||||
entire combination fits its criteria of freedom. The Lesser General
|
||||
Public License permits more lax criteria for linking other code with
|
||||
the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it
|
||||
does Less to protect the user's freedom than the ordinary General
|
||||
Public License. It also provides other free software developers Less
|
||||
of an advantage over competing non-free programs. These disadvantages
|
||||
are the reason we use the ordinary General Public License for many
|
||||
libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to
|
||||
encourage the widest possible use of a certain library, so that it becomes
|
||||
a de-facto standard. To achieve this, non-free programs must be
|
||||
allowed to use the library. A more frequent case is that a free
|
||||
library does the same job as widely used non-free libraries. In this
|
||||
case, there is little to gain by limiting the free library to free
|
||||
software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free
|
||||
programs enables a greater number of people to use a large body of
|
||||
free software. For example, permission to use the GNU C Library in
|
||||
non-free programs enables many more people to use the whole GNU
|
||||
operating system, as well as its variant, the GNU/Linux operating
|
||||
system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the
|
||||
users' freedom, it does ensure that the user of a program that is
|
||||
linked with the Library has the freedom and the wherewithal to run
|
||||
that program using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other
|
||||
program which contains a notice placed by the copyright holder or
|
||||
other authorized party saying it may be distributed under the terms of
|
||||
this Lesser General Public License (also called "this License").
|
||||
Each licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (1) uses at run time a
|
||||
copy of the library already present on the user's computer system,
|
||||
rather than copying library functions into the executable, and (2)
|
||||
will operate properly with a modified version of the library, if
|
||||
the user installs one, as long as the modified version is
|
||||
interface-compatible with the version that the work was made with.
|
||||
|
||||
c) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
d) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
e) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the materials to be distributed need not include anything that is
|
||||
normally distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Lesser General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms of the
|
||||
ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library. It is
|
||||
safest to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
{description}
|
||||
Copyright (C) {year} {fullname}
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
|
||||
USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random
|
||||
Hacker.
|
||||
|
||||
{signature of Ty Coon}, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
||||
165
conf/license/LGPL v3
Normal file
165
conf/license/LGPL v3
Normal file
@@ -0,0 +1,165 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
|
||||
This version of the GNU Lesser General Public License incorporates
|
||||
the terms and conditions of version 3 of the GNU General Public
|
||||
License, supplemented by the additional permissions listed below.
|
||||
|
||||
0. Additional Definitions.
|
||||
|
||||
As used herein, "this License" refers to version 3 of the GNU Lesser
|
||||
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
||||
General Public License.
|
||||
|
||||
"The Library" refers to a covered work governed by this License,
|
||||
other than an Application or a Combined Work as defined below.
|
||||
|
||||
An "Application" is any work that makes use of an interface provided
|
||||
by the Library, but which is not otherwise based on the Library.
|
||||
Defining a subclass of a class defined by the Library is deemed a mode
|
||||
of using an interface provided by the Library.
|
||||
|
||||
A "Combined Work" is a work produced by combining or linking an
|
||||
Application with the Library. The particular version of the Library
|
||||
with which the Combined Work was made is also called the "Linked
|
||||
Version".
|
||||
|
||||
The "Minimal Corresponding Source" for a Combined Work means the
|
||||
Corresponding Source for the Combined Work, excluding any source code
|
||||
for portions of the Combined Work that, considered in isolation, are
|
||||
based on the Application, and not on the Linked Version.
|
||||
|
||||
The "Corresponding Application Code" for a Combined Work means the
|
||||
object code and/or source code for the Application, including any data
|
||||
and utility programs needed for reproducing the Combined Work from the
|
||||
Application, but excluding the System Libraries of the Combined Work.
|
||||
|
||||
1. Exception to Section 3 of the GNU GPL.
|
||||
|
||||
You may convey a covered work under sections 3 and 4 of this License
|
||||
without being bound by section 3 of the GNU GPL.
|
||||
|
||||
2. Conveying Modified Versions.
|
||||
|
||||
If you modify a copy of the Library, and, in your modifications, a
|
||||
facility refers to a function or data to be supplied by an Application
|
||||
that uses the facility (other than as an argument passed when the
|
||||
facility is invoked), then you may convey a copy of the modified
|
||||
version:
|
||||
|
||||
a) under this License, provided that you make a good faith effort to
|
||||
ensure that, in the event an Application does not supply the
|
||||
function or data, the facility still operates, and performs
|
||||
whatever part of its purpose remains meaningful, or
|
||||
|
||||
b) under the GNU GPL, with none of the additional permissions of
|
||||
this License applicable to that copy.
|
||||
|
||||
3. Object Code Incorporating Material from Library Header Files.
|
||||
|
||||
The object code form of an Application may incorporate material from
|
||||
a header file that is part of the Library. You may convey such object
|
||||
code under terms of your choice, provided that, if the incorporated
|
||||
material is not limited to numerical parameters, data structure
|
||||
layouts and accessors, or small macros, inline functions and templates
|
||||
(ten or fewer lines in length), you do both of the following:
|
||||
|
||||
a) Give prominent notice with each copy of the object code that the
|
||||
Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the object code with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
4. Combined Works.
|
||||
|
||||
You may convey a Combined Work under terms of your choice that,
|
||||
taken together, effectively do not restrict modification of the
|
||||
portions of the Library contained in the Combined Work and reverse
|
||||
engineering for debugging such modifications, if you also do each of
|
||||
the following:
|
||||
|
||||
a) Give prominent notice with each copy of the Combined Work that
|
||||
the Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
c) For a Combined Work that displays copyright notices during
|
||||
execution, include the copyright notice for the Library among
|
||||
these notices, as well as a reference directing the user to the
|
||||
copies of the GNU GPL and this license document.
|
||||
|
||||
d) Do one of the following:
|
||||
|
||||
0) Convey the Minimal Corresponding Source under the terms of this
|
||||
License, and the Corresponding Application Code in a form
|
||||
suitable for, and under terms that permit, the user to
|
||||
recombine or relink the Application with a modified version of
|
||||
the Linked Version to produce a modified Combined Work, in the
|
||||
manner specified by section 6 of the GNU GPL for conveying
|
||||
Corresponding Source.
|
||||
|
||||
1) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (a) uses at run time
|
||||
a copy of the Library already present on the user's computer
|
||||
system, and (b) will operate properly with a modified version
|
||||
of the Library that is interface-compatible with the Linked
|
||||
Version.
|
||||
|
||||
e) Provide Installation Information, but only if you would otherwise
|
||||
be required to provide such information under section 6 of the
|
||||
GNU GPL, and only to the extent that such information is
|
||||
necessary to install and execute a modified version of the
|
||||
Combined Work produced by recombining or relinking the
|
||||
Application with a modified version of the Linked Version. (If
|
||||
you use option 4d0, the Installation Information must accompany
|
||||
the Minimal Corresponding Source and Corresponding Application
|
||||
Code. If you use option 4d1, you must provide the Installation
|
||||
Information in the manner specified by section 6 of the GNU GPL
|
||||
for conveying Corresponding Source.)
|
||||
|
||||
5. Combined Libraries.
|
||||
|
||||
You may place library facilities that are a work based on the
|
||||
Library side by side in a single library together with other library
|
||||
facilities that are not Applications and are not covered by this
|
||||
License, and convey such a combined library under terms of your
|
||||
choice, if you do both of the following:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work based
|
||||
on the Library, uncombined with any other library facilities,
|
||||
conveyed under the terms of this License.
|
||||
|
||||
b) Give prominent notice with the combined library that part of it
|
||||
is a work based on the Library, and explaining where to find the
|
||||
accompanying uncombined form of the same work.
|
||||
|
||||
6. Revised Versions of the GNU Lesser General Public License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions
|
||||
of the GNU Lesser General Public License from time to time. Such new
|
||||
versions will be similar in spirit to the present version, but may
|
||||
differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Library as you received it specifies that a certain numbered version
|
||||
of the GNU Lesser General Public License "or any later version"
|
||||
applies to it, you have the option of following the terms and
|
||||
conditions either of that published version or of any later version
|
||||
published by the Free Software Foundation. If the Library as you
|
||||
received it does not specify a version number of the GNU Lesser
|
||||
General Public License, you may choose any version of the GNU Lesser
|
||||
General Public License ever published by the Free Software Foundation.
|
||||
|
||||
If the Library as you received it specifies that a proxy can decide
|
||||
whether future versions of the GNU Lesser General Public License shall
|
||||
apply, that proxy's public statement of acceptance of any version is
|
||||
permanent authorization for you to choose that version for the
|
||||
Library.
|
||||
362
conf/license/Mozilla Public License Version 2.0
Normal file
362
conf/license/Mozilla Public License Version 2.0
Normal file
@@ -0,0 +1,362 @@
|
||||
Mozilla Public License, version 2.0
|
||||
|
||||
1. Definitions
|
||||
|
||||
1.1. "Contributor"
|
||||
|
||||
means each individual or legal entity that creates, contributes to the
|
||||
creation of, or owns Covered Software.
|
||||
|
||||
1.2. "Contributor Version"
|
||||
|
||||
means the combination of the Contributions of others (if any) used by a
|
||||
Contributor and that particular Contributor's Contribution.
|
||||
|
||||
1.3. "Contribution"
|
||||
|
||||
means Covered Software of a particular Contributor.
|
||||
|
||||
1.4. "Covered Software"
|
||||
|
||||
means Source Code Form to which the initial Contributor has attached the
|
||||
notice in Exhibit A, the Executable Form of such Source Code Form, and
|
||||
Modifications of such Source Code Form, in each case including portions
|
||||
thereof.
|
||||
|
||||
1.5. "Incompatible With Secondary Licenses"
|
||||
means
|
||||
|
||||
a. that the initial Contributor has attached the notice described in
|
||||
Exhibit B to the Covered Software; or
|
||||
|
||||
b. that the Covered Software was made available under the terms of
|
||||
version 1.1 or earlier of the License, but not also under the terms of
|
||||
a Secondary License.
|
||||
|
||||
1.6. "Executable Form"
|
||||
|
||||
means any form of the work other than Source Code Form.
|
||||
|
||||
1.7. "Larger Work"
|
||||
|
||||
means a work that combines Covered Software with other material, in a
|
||||
separate file or files, that is not Covered Software.
|
||||
|
||||
1.8. "License"
|
||||
|
||||
means this document.
|
||||
|
||||
1.9. "Licensable"
|
||||
|
||||
means having the right to grant, to the maximum extent possible, whether
|
||||
at the time of the initial grant or subsequently, any and all of the
|
||||
rights conveyed by this License.
|
||||
|
||||
1.10. "Modifications"
|
||||
|
||||
means any of the following:
|
||||
|
||||
a. any file in Source Code Form that results from an addition to,
|
||||
deletion from, or modification of the contents of Covered Software; or
|
||||
|
||||
b. any new file in Source Code Form that contains any Covered Software.
|
||||
|
||||
1.11. "Patent Claims" of a Contributor
|
||||
|
||||
means any patent claim(s), including without limitation, method,
|
||||
process, and apparatus claims, in any patent Licensable by such
|
||||
Contributor that would be infringed, but for the grant of the License,
|
||||
by the making, using, selling, offering for sale, having made, import,
|
||||
or transfer of either its Contributions or its Contributor Version.
|
||||
|
||||
1.12. "Secondary License"
|
||||
|
||||
means either the GNU General Public License, Version 2.0, the GNU Lesser
|
||||
General Public License, Version 2.1, the GNU Affero General Public
|
||||
License, Version 3.0, or any later versions of those licenses.
|
||||
|
||||
1.13. "Source Code Form"
|
||||
|
||||
means the form of the work preferred for making modifications.
|
||||
|
||||
1.14. "You" (or "Your")
|
||||
|
||||
means an individual or a legal entity exercising rights under this
|
||||
License. For legal entities, "You" includes any entity that controls, is
|
||||
controlled by, or is under common control with You. For purposes of this
|
||||
definition, "control" means (a) the power, direct or indirect, to cause
|
||||
the direction or management of such entity, whether by contract or
|
||||
otherwise, or (b) ownership of more than fifty percent (50%) of the
|
||||
outstanding shares or beneficial ownership of such entity.
|
||||
|
||||
|
||||
2. License Grants and Conditions
|
||||
|
||||
2.1. Grants
|
||||
|
||||
Each Contributor hereby grants You a world-wide, royalty-free,
|
||||
non-exclusive license:
|
||||
|
||||
a. under intellectual property rights (other than patent or trademark)
|
||||
Licensable by such Contributor to use, reproduce, make available,
|
||||
modify, display, perform, distribute, and otherwise exploit its
|
||||
Contributions, either on an unmodified basis, with Modifications, or
|
||||
as part of a Larger Work; and
|
||||
|
||||
b. under Patent Claims of such Contributor to make, use, sell, offer for
|
||||
sale, have made, import, and otherwise transfer either its
|
||||
Contributions or its Contributor Version.
|
||||
|
||||
2.2. Effective Date
|
||||
|
||||
The licenses granted in Section 2.1 with respect to any Contribution
|
||||
become effective for each Contribution on the date the Contributor first
|
||||
distributes such Contribution.
|
||||
|
||||
2.3. Limitations on Grant Scope
|
||||
|
||||
The licenses granted in this Section 2 are the only rights granted under
|
||||
this License. No additional rights or licenses will be implied from the
|
||||
distribution or licensing of Covered Software under this License.
|
||||
Notwithstanding Section 2.1(b) above, no patent license is granted by a
|
||||
Contributor:
|
||||
|
||||
a. for any code that a Contributor has removed from Covered Software; or
|
||||
|
||||
b. for infringements caused by: (i) Your and any other third party's
|
||||
modifications of Covered Software, or (ii) the combination of its
|
||||
Contributions with other software (except as part of its Contributor
|
||||
Version); or
|
||||
|
||||
c. under Patent Claims infringed by Covered Software in the absence of
|
||||
its Contributions.
|
||||
|
||||
This License does not grant any rights in the trademarks, service marks,
|
||||
or logos of any Contributor (except as may be necessary to comply with
|
||||
the notice requirements in Section 3.4).
|
||||
|
||||
2.4. Subsequent Licenses
|
||||
|
||||
No Contributor makes additional grants as a result of Your choice to
|
||||
distribute the Covered Software under a subsequent version of this
|
||||
License (see Section 10.2) or under the terms of a Secondary License (if
|
||||
permitted under the terms of Section 3.3).
|
||||
|
||||
2.5. Representation
|
||||
|
||||
Each Contributor represents that the Contributor believes its
|
||||
Contributions are its original creation(s) or it has sufficient rights to
|
||||
grant the rights to its Contributions conveyed by this License.
|
||||
|
||||
2.6. Fair Use
|
||||
|
||||
This License is not intended to limit any rights You have under
|
||||
applicable copyright doctrines of fair use, fair dealing, or other
|
||||
equivalents.
|
||||
|
||||
2.7. Conditions
|
||||
|
||||
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in
|
||||
Section 2.1.
|
||||
|
||||
|
||||
3. Responsibilities
|
||||
|
||||
3.1. Distribution of Source Form
|
||||
|
||||
All distribution of Covered Software in Source Code Form, including any
|
||||
Modifications that You create or to which You contribute, must be under
|
||||
the terms of this License. You must inform recipients that the Source
|
||||
Code Form of the Covered Software is governed by the terms of this
|
||||
License, and how they can obtain a copy of this License. You may not
|
||||
attempt to alter or restrict the recipients' rights in the Source Code
|
||||
Form.
|
||||
|
||||
3.2. Distribution of Executable Form
|
||||
|
||||
If You distribute Covered Software in Executable Form then:
|
||||
|
||||
a. such Covered Software must also be made available in Source Code Form,
|
||||
as described in Section 3.1, and You must inform recipients of the
|
||||
Executable Form how they can obtain a copy of such Source Code Form by
|
||||
reasonable means in a timely manner, at a charge no more than the cost
|
||||
of distribution to the recipient; and
|
||||
|
||||
b. You may distribute such Executable Form under the terms of this
|
||||
License, or sublicense it under different terms, provided that the
|
||||
license for the Executable Form does not attempt to limit or alter the
|
||||
recipients' rights in the Source Code Form under this License.
|
||||
|
||||
3.3. Distribution of a Larger Work
|
||||
|
||||
You may create and distribute a Larger Work under terms of Your choice,
|
||||
provided that You also comply with the requirements of this License for
|
||||
the Covered Software. If the Larger Work is a combination of Covered
|
||||
Software with a work governed by one or more Secondary Licenses, and the
|
||||
Covered Software is not Incompatible With Secondary Licenses, this
|
||||
License permits You to additionally distribute such Covered Software
|
||||
under the terms of such Secondary License(s), so that the recipient of
|
||||
the Larger Work may, at their option, further distribute the Covered
|
||||
Software under the terms of either this License or such Secondary
|
||||
License(s).
|
||||
|
||||
3.4. Notices
|
||||
|
||||
You may not remove or alter the substance of any license notices
|
||||
(including copyright notices, patent notices, disclaimers of warranty, or
|
||||
limitations of liability) contained within the Source Code Form of the
|
||||
Covered Software, except that You may alter any license notices to the
|
||||
extent required to remedy known factual inaccuracies.
|
||||
|
||||
3.5. Application of Additional Terms
|
||||
|
||||
You may choose to offer, and to charge a fee for, warranty, support,
|
||||
indemnity or liability obligations to one or more recipients of Covered
|
||||
Software. However, You may do so only on Your own behalf, and not on
|
||||
behalf of any Contributor. You must make it absolutely clear that any
|
||||
such warranty, support, indemnity, or liability obligation is offered by
|
||||
You alone, and You hereby agree to indemnify every Contributor for any
|
||||
liability incurred by such Contributor as a result of warranty, support,
|
||||
indemnity or liability terms You offer. You may include additional
|
||||
disclaimers of warranty and limitations of liability specific to any
|
||||
jurisdiction.
|
||||
|
||||
4. Inability to Comply Due to Statute or Regulation
|
||||
|
||||
If it is impossible for You to comply with any of the terms of this License
|
||||
with respect to some or all of the Covered Software due to statute,
|
||||
judicial order, or regulation then You must: (a) comply with the terms of
|
||||
this License to the maximum extent possible; and (b) describe the
|
||||
limitations and the code they affect. Such description must be placed in a
|
||||
text file included with all distributions of the Covered Software under
|
||||
this License. Except to the extent prohibited by statute or regulation,
|
||||
such description must be sufficiently detailed for a recipient of ordinary
|
||||
skill to be able to understand it.
|
||||
|
||||
5. Termination
|
||||
|
||||
5.1. The rights granted under this License will terminate automatically if You
|
||||
fail to comply with any of its terms. However, if You become compliant,
|
||||
then the rights granted under this License from a particular Contributor
|
||||
are reinstated (a) provisionally, unless and until such Contributor
|
||||
explicitly and finally terminates Your grants, and (b) on an ongoing
|
||||
basis, if such Contributor fails to notify You of the non-compliance by
|
||||
some reasonable means prior to 60 days after You have come back into
|
||||
compliance. Moreover, Your grants from a particular Contributor are
|
||||
reinstated on an ongoing basis if such Contributor notifies You of the
|
||||
non-compliance by some reasonable means, this is the first time You have
|
||||
received notice of non-compliance with this License from such
|
||||
Contributor, and You become compliant prior to 30 days after Your receipt
|
||||
of the notice.
|
||||
|
||||
5.2. If You initiate litigation against any entity by asserting a patent
|
||||
infringement claim (excluding declaratory judgment actions,
|
||||
counter-claims, and cross-claims) alleging that a Contributor Version
|
||||
directly or indirectly infringes any patent, then the rights granted to
|
||||
You by any and all Contributors for the Covered Software under Section
|
||||
2.1 of this License shall terminate.
|
||||
|
||||
5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user
|
||||
license agreements (excluding distributors and resellers) which have been
|
||||
validly granted by You or Your distributors under this License prior to
|
||||
termination shall survive termination.
|
||||
|
||||
6. Disclaimer of Warranty
|
||||
|
||||
Covered Software is provided under this License on an "as is" basis,
|
||||
without warranty of any kind, either expressed, implied, or statutory,
|
||||
including, without limitation, warranties that the Covered Software is free
|
||||
of defects, merchantable, fit for a particular purpose or non-infringing.
|
||||
The entire risk as to the quality and performance of the Covered Software
|
||||
is with You. Should any Covered Software prove defective in any respect,
|
||||
You (not any Contributor) assume the cost of any necessary servicing,
|
||||
repair, or correction. This disclaimer of warranty constitutes an essential
|
||||
part of this License. No use of any Covered Software is authorized under
|
||||
this License except under this disclaimer.
|
||||
|
||||
7. Limitation of Liability
|
||||
|
||||
Under no circumstances and under no legal theory, whether tort (including
|
||||
negligence), contract, or otherwise, shall any Contributor, or anyone who
|
||||
distributes Covered Software as permitted above, be liable to You for any
|
||||
direct, indirect, special, incidental, or consequential damages of any
|
||||
character including, without limitation, damages for lost profits, loss of
|
||||
goodwill, work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses, even if such party shall have been
|
||||
informed of the possibility of such damages. This limitation of liability
|
||||
shall not apply to liability for death or personal injury resulting from
|
||||
such party's negligence to the extent applicable law prohibits such
|
||||
limitation. Some jurisdictions do not allow the exclusion or limitation of
|
||||
incidental or consequential damages, so this exclusion and limitation may
|
||||
not apply to You.
|
||||
|
||||
8. Litigation
|
||||
|
||||
Any litigation relating to this License may be brought only in the courts
|
||||
of a jurisdiction where the defendant maintains its principal place of
|
||||
business and such litigation shall be governed by laws of that
|
||||
jurisdiction, without reference to its conflict-of-law provisions. Nothing
|
||||
in this Section shall prevent a party's ability to bring cross-claims or
|
||||
counter-claims.
|
||||
|
||||
9. Miscellaneous
|
||||
|
||||
This License represents the complete agreement concerning the subject
|
||||
matter hereof. If any provision of this License is held to be
|
||||
unenforceable, such provision shall be reformed only to the extent
|
||||
necessary to make it enforceable. Any law or regulation which provides that
|
||||
the language of a contract shall be construed against the drafter shall not
|
||||
be used to construe this License against a Contributor.
|
||||
|
||||
|
||||
10. Versions of the License
|
||||
|
||||
10.1. New Versions
|
||||
|
||||
Mozilla Foundation is the license steward. Except as provided in Section
|
||||
10.3, no one other than the license steward has the right to modify or
|
||||
publish new versions of this License. Each version will be given a
|
||||
distinguishing version number.
|
||||
|
||||
10.2. Effect of New Versions
|
||||
|
||||
You may distribute the Covered Software under the terms of the version
|
||||
of the License under which You originally received the Covered Software,
|
||||
or under the terms of any subsequent version published by the license
|
||||
steward.
|
||||
|
||||
10.3. Modified Versions
|
||||
|
||||
If you create software not governed by this License, and you want to
|
||||
create a new license for such software, you may create and use a
|
||||
modified version of this License if you rename the license and remove
|
||||
any references to the name of the license steward (except to note that
|
||||
such modified license differs from this License).
|
||||
|
||||
10.4. Distributing Source Code Form that is Incompatible With Secondary
|
||||
Licenses If You choose to distribute Source Code Form that is
|
||||
Incompatible With Secondary Licenses under the terms of this version of
|
||||
the License, the notice described in Exhibit B of this License must be
|
||||
attached.
|
||||
|
||||
Exhibit A - Source Code Form License Notice
|
||||
|
||||
This Source Code Form is subject to the
|
||||
terms of the Mozilla Public License, v.
|
||||
2.0. If a copy of the MPL was not
|
||||
distributed with this file, You can
|
||||
obtain one at
|
||||
http://mozilla.org/MPL/2.0/.
|
||||
|
||||
If it is not possible or desirable to put the notice in a particular file,
|
||||
then You may include the notice in a location (such as a LICENSE file in a
|
||||
relevant directory) where a recipient would be likely to look for such a
|
||||
notice.
|
||||
|
||||
You may add additional accurate notices of copyright ownership.
|
||||
|
||||
Exhibit B - "Incompatible With Secondary Licenses" Notice
|
||||
|
||||
This Source Code Form is "Incompatible
|
||||
With Secondary Licenses", as defined by
|
||||
the Mozilla Public License, v. 2.0.
|
||||
6
conf/locale/TRANSLATORS
Normal file
6
conf/locale/TRANSLATORS
Normal file
@@ -0,0 +1,6 @@
|
||||
# This file lists all PUBLIC individuals having contributed content to the translation.
|
||||
# Order of name is meaningless.
|
||||
|
||||
Thomas Fanninger <gogs.thomas@fanninger.at>
|
||||
Łukasz Jan Niemier <lukasz@niemier.pl>
|
||||
Lafriks <lafriks@gmail.com>
|
||||
718
conf/locale/locale_de-DE.ini
Executable file
718
conf/locale/locale_de-DE.ini
Executable file
@@ -0,0 +1,718 @@
|
||||
app_desc=Ein einfacher, selbst gehosteter Git-Service, geschrieben in Go
|
||||
|
||||
home=Home
|
||||
dashboard=Übersicht
|
||||
explore=Erkunden
|
||||
help=Hilfe
|
||||
sign_in=Anmelden
|
||||
social_sign_in=Anmeldung über soziales Konto: zweiter Schritt <small>Konto verknüpfen</small>
|
||||
sign_out=Abmelden
|
||||
sign_up=Registrieren
|
||||
register=Registrieren
|
||||
website=Webseite
|
||||
version=Version
|
||||
page=Seite
|
||||
template=Vorlage
|
||||
language=Sprache
|
||||
|
||||
username=Benutzername
|
||||
email=E-Mail
|
||||
password=Passwort
|
||||
re_type=Passwort bestätigen
|
||||
captcha=Captcha
|
||||
|
||||
repository=Repository
|
||||
organization=Organisation
|
||||
mirror=Spiegel
|
||||
new_repo=Neues Repository
|
||||
new_migrate=Neue Migration
|
||||
new_fork=Neues abgespaltetes Repository
|
||||
new_org=Neue Organisation
|
||||
manage_org=Organisationen verwalten
|
||||
admin_panel=Admin-Panel
|
||||
account_settings=Kontoeinstellungen
|
||||
settings=Einstellungen
|
||||
|
||||
news_feed=News Feed
|
||||
pull_requests=Pull Requests
|
||||
issues=Issues
|
||||
|
||||
cancel=Abbrechen
|
||||
|
||||
[install]
|
||||
install=Installation
|
||||
title=Installation für erstmaligen Start
|
||||
requite_db_desc=Gogs erfordert MySQL, PostgreSQL oder SQLite 3, aber SQLite3 ist in der offiziellen binären Version akiviert.
|
||||
db_type=Datenbanktyp
|
||||
host=Host
|
||||
user=Benutzer
|
||||
password=Passwort
|
||||
db_name=Datenbankname
|
||||
db_helper=Bitte verwenden InnoDB-Engine mit utf8_general_ci Zeichensatz für MySQL.
|
||||
ssl_mode=SSL-Modus
|
||||
path=Pfad
|
||||
sqlite_helper=Der Dateipfad des SQLite3 Datenbank.
|
||||
general_title=Allgemeine Einstellungen von Gogs
|
||||
repo_path=Repository Root-Verzeichnispfad
|
||||
repo_path_helper=Alle Git-Repositorys werden in diesem Verzeichnis gespeichert.
|
||||
run_user=Ausführender Benutzer
|
||||
run_user_helper=Der Benutzer muss die Zugriffsberechtigung für das Repository Root-Verzeichnis haben und der ausführende Benutzer von Gogs sein.
|
||||
domain=Domain
|
||||
domain_helper=Dies hat Auswirkung auf die SSH clone URLs.
|
||||
app_url=Anwendungs-URL
|
||||
app_url_helper=Dies hat Auswirkung auf die HTTP/HTTPS clone URLs und für die E-Mails.
|
||||
email_title=E-Mail-Service-Einstellungen (optional)
|
||||
smtp_host=SMTP Host
|
||||
mailer_user=Sender E-mail
|
||||
mailer_password=Sender Passwort
|
||||
notify_title=Benachrichtigungseinstellungen (optional)
|
||||
register_confirm=Registrierungsbestätigung aktvieren
|
||||
mail_notify=E-Mail-Benachrichtgung aktivieren
|
||||
admin_title=Konto-Einstellungen für den Administrator
|
||||
admin_name=Benutzername
|
||||
admin_password=Passwort
|
||||
confirm_password=Passwort bestätigen
|
||||
admin_email=E-Mail
|
||||
install_gogs=Gogs installieren
|
||||
test_git_failed=Fehler beim Test des 'git' Kommandos: %v
|
||||
sqlite3_not_available=Deine Version unterstützt SQLite3 nicht, bitte lade dir die offizielle binäre Version von %s herunter, NICHT die gobuild-Version.
|
||||
invalid_db_setting=Datenbank-Einstellungen sind nicht korrekt: %v
|
||||
invalid_repo_path=Repository Root-Verzeichnis ist ungültig: %v
|
||||
run_user_not_match=Der ausführende Benutzer ist nicht der aktuelle Benutzer: %s -> %s
|
||||
save_config_failed=Versuche die Konfiguration zu speichern ist fehlgeschlagen: %v
|
||||
invalid_admin_setting=Admin-Konto Einstellungen sind ungültig: %v
|
||||
install_success=Herzlich Willkommen! Wir sind froh, dass du dich für Gogs entschieden hast. Hab viel Vergnügen damit.
|
||||
|
||||
[home]
|
||||
uname_holder=Benutzername oder E-Mail
|
||||
password_holder=Passwort
|
||||
switch_dashboard_context=Dashboard Kontext wechseln
|
||||
my_repos=Meine Repositorys
|
||||
collaborative_repos=Gemeinschaftliche Repositorys
|
||||
my_orgs=Meine Organisationen
|
||||
my_mirrors=Meine Spiegel
|
||||
|
||||
[explore]
|
||||
repos=Repositorys
|
||||
|
||||
[auth]
|
||||
create_new_account=Neues Konto erstellen
|
||||
register_hepler_msg=Du hast schon ein Konto? Jetzt anmelden!
|
||||
social_register_hepler_msg=Du hast schon ein soziales Konto? Jetzt verknüpfen!
|
||||
disable_register_prompt=Es tut uns leid, die Registrierung wurde deaktiviert. Bitte wende dich an den Administrator.
|
||||
disable_register_mail=Es tut uns leid, die Bestätigung der Registrierungs-E-Mail wurde deaktiviert.
|
||||
remember_me=angemeldet bleiben
|
||||
forgot_password=Passwort vergessen
|
||||
forget_password=Passwort vergessen?
|
||||
sign_up_now=Du willst ein Konto? Jetzt registrieren!
|
||||
confirmation_mail_sent_prompt=Eine neue Bestätigungs-E-Mail wurde an <b>%s</b> gesendet. Kontrolliere dein Postfach innerhalb der nächsten %d Stunden, um die Registrierung abzuschließen.
|
||||
sign_in_email=Melde dich mit deiner E-Mail-Adresse an
|
||||
active_your_account=Aktiviere dein Konto
|
||||
resent_limit_prompt=Es tut uns leid, du sendest zu häufig Aktivierungs-E-Mails. Bitte warte 3 Minuten.
|
||||
has_unconfirmed_mail=Hallo %s, du hast eine unbestätigte E-Mail-Adresse (<b>%s</b>). Falls du noch keine Bestätigungs-E-Mail erhalten hast oder eine neue senden musst, klicke auf den unteren Button.
|
||||
resend_mail=Hier klicken, um deine Aktivierungs-E-Mail erneut zu versenden
|
||||
email_not_associate=Diese E-Mail-Adresse ist mit keinem Konto verknüpft.
|
||||
send_reset_mail=Hier klicken, um die E-Mail zum Passwort-zurücksetzen erneut zu versenden
|
||||
reset_password=Passwort zurücksetzen
|
||||
invalid_code=Es tut uns leid, der Bestätigungscode ist abgelaufen oder ungültig.
|
||||
reset_password_helper=Hier klicken, um das Passwort zurückzusetzen
|
||||
password_too_short=Das Passwort muss mindenstens 6 Zeichen lang sein
|
||||
|
||||
[form]
|
||||
UserName=Benutzername
|
||||
RepoName=Repository-Name
|
||||
Email=E-Mail-Adresse
|
||||
Password=Passwort
|
||||
Retype=Passwort bestätigen
|
||||
SSHTitle=SSH-Schlüsselname
|
||||
HttpsUrl=HTTPS-URL
|
||||
PayloadUrl=Payload-URL
|
||||
TeamName=Teamname
|
||||
AuthName=Authentifizierungsname
|
||||
AdminEmail=Admin E-mail
|
||||
|
||||
require_error=` darf nicht leer sein.`
|
||||
alpha_dash_error=` kann ausschließlich alphanumerische Zeichen und "-_" enthalten.`
|
||||
alpha_dash_dot_error=` kann ausschließlich alphanumerische Zeichen und ".-_" enthalten.`
|
||||
min_size_error=` muss mindestens %s Zeichen enthalten.`
|
||||
max_size_error=` darf höchstens %s Zeichen enthalten.`
|
||||
email_error=` ist keine gültige E-Mail-Adresse.`
|
||||
url_error=` ist keine gültige URL.`
|
||||
unknown_error=Unbekannter Fehler:
|
||||
captcha_incorrect=Captcha stimmt nicht überein.
|
||||
password_not_match=Die Passwörter stimmen nicht überein.
|
||||
|
||||
username_been_taken=Benutzername ist bereits vergeben.
|
||||
repo_name_been_taken=Repository-Name ist bereits vergeben.
|
||||
org_name_been_taken=Organisationsname ist bereits vergeben.
|
||||
team_name_been_taken=Teamname ist bereits vergeben.
|
||||
email_been_used=E-Mail-Adresse wird bereits verwendet.
|
||||
ssh_key_been_used=SSH-Schlüsselname wird bereits verwendet.
|
||||
illegal_username=Benutzername enthält ungültige Zeichen.
|
||||
illegal_repo_name=Repository-Name enthält ungültige Zeichen.
|
||||
illegal_org_name=Organisationsname enthält ungültige Zeichen.
|
||||
illegal_team_name=Teamname enthält ungültige Zeichen.
|
||||
username_password_incorrect=Benutzername oder Passwort ist nicht korrekt.
|
||||
enterred_invalid_repo_name=Bitte stelle sicher, dass der eingegeben Repository-Name richtig ist.
|
||||
enterred_invalid_owner_name=Bitte stelle sicher, dass der eingegeben Besitzername richtig ist.
|
||||
enterred_invalid_password=Bitte stelle sicher, dass das eingegebene Passwort richtig ist.
|
||||
user_not_exist=Angegebener Benutzer existiert nicht.
|
||||
last_org_owner=Der zu entfernende Benutzer ist der letzte Teambesitzer. Es muss einen anderen Besitzer geben.
|
||||
|
||||
invalid_ssh_key=Leider sind wir nicht in der Lage, deinen SSH-Schlüssel zu überprüfen: %s
|
||||
unable_verify_ssh_key=Gogs kann deinen SSH-Schlüssel nicht verifizieren, nimmt aber an, dass er gültig ist. Bitte stelle dies selbst sicher.
|
||||
auth_failed=Authentifizierung fehlgeschlagen: %v
|
||||
|
||||
still_own_repo=Dein Konto besitzt noch Repositorys. Diese müssen zuerst gelöscht oder übertragen werden.
|
||||
still_has_org=Du bist noch Mitglied einer Organisation, bitte lösche zunächst diese Mitgliedschaft.
|
||||
org_still_own_repo=Diese Organisation besitzt noch Repositorys. Diese müssen zuerst gelöscht oder übertragen werden.
|
||||
|
||||
still_own_user=Diese Authentifizierung wird noch von einigen Benutzern genutzt. Entferne diese zuvor und lösche erneut.
|
||||
|
||||
target_branch_not_exist=Ziel-Branch existiert nicht
|
||||
|
||||
[user]
|
||||
change_avatar=Ändere dein Profilbild auf gravatar.com
|
||||
change_custom_avatar=Ändere deinen Avatar in den Einstellungen
|
||||
join_on=Registriert
|
||||
repositories=Repositorys
|
||||
activity=Öffentliche Aktivität
|
||||
followers=Folgen
|
||||
starred=Markiert
|
||||
following=Folgt
|
||||
|
||||
[settings]
|
||||
profile=Profil
|
||||
password=Passwort
|
||||
ssh_keys=SSH-Schlüssel
|
||||
social=Soziale Konten
|
||||
applications=Anwendungen
|
||||
orgs=Organisationen
|
||||
delete=Konto löschen
|
||||
uid=Uid
|
||||
|
||||
public_profile=Öffentliches Profil
|
||||
profile_desc=Deine E-Mail-Adresse ist öffentlich und dient dazu, dir Benachrichtigungen bezüglich deines Kontos und deiner Repositorys zu schicken.
|
||||
full_name=Vollständiger Name
|
||||
website=Webseite
|
||||
location=Standort
|
||||
update_profile=Profil aktualisieren
|
||||
update_profile_success=Profil aktualisiert
|
||||
change_username=Benutzername geändert
|
||||
change_username_desc=Benutzername wurde geändert, möchtest du fortfahren? Dies beeinträchtigt sämtliche Links, die dein Konto betreffen.
|
||||
continue=Weiter
|
||||
cancel=Abbrechen
|
||||
|
||||
enable_custom_avatar=Aktiviere benuztzerdefinierten Avatar
|
||||
enable_custom_avatar_helper=Aktiviere dies, um deinen Avatar nicht von Gravatar zu laden
|
||||
choose_new_avatar=Neuen Avatar auswählen
|
||||
update_avatar=Avatar-Einstellung aktualisieren
|
||||
uploaded_avatar_not_a_image=Die hochgeladene Datei ist kein Bild.
|
||||
no_custom_avatar_available=Kein benutzerdefinierter Avatar verfügbar, Aktivierung ist nicht möglich.
|
||||
update_avatar_success=Deine Avatar-Einstellung wurde aktualisiert.
|
||||
|
||||
change_password=Passwort ändern
|
||||
old_password=Aktuelles Passwort
|
||||
new_password=Neues Passwort
|
||||
password_incorrect=Aktuelles Passwort ist nicht korrekt.
|
||||
change_password_success=Passwort geändert. Du kannst dich jetzt mit dem neuen Passwort anmelden.
|
||||
|
||||
manage_ssh_keys=SSH-Schlüssel verwalten
|
||||
add_key=SSH-Schlüssel hinzufügen
|
||||
ssh_desc=Dies ist eine Liste aller SSH-Schlüssel, die mit deinem Konto verknüpft sind. Entferne alle Schlüssel, die du nicht kennst.
|
||||
ssh_helper=<strong>Du brauchst Hilfe?</strong> Hier ist eine Anleitung zum <a href="%s">Erzeugen von SSH-Schlüsseln</a> oder <a href="%s">Problemlösen einfacher SSH-Probleme</a>.
|
||||
add_new_key=SSH-Schlüssel hinzufügen
|
||||
key_name=Schlüsselname
|
||||
key_content=Inhalt
|
||||
add_key_success=SSH-Schlüssel hinzugefügt
|
||||
delete_key=SSH-Schlüssel löschen
|
||||
add_on=Hinzugefügt am
|
||||
last_used=Zuletzt verwendet auf
|
||||
no_activity=Keine neuen Aktivitäten
|
||||
|
||||
manage_social=Verknüpfte soziale Konten verwalten
|
||||
social_desc=Dies ist eine Liste verknüpfter sozialer Konten. Entferne alle Verknüpfungen, die du nicht kennst.
|
||||
unbind=Verknüpfung entfernen
|
||||
unbind_success=Die Verknüpfung zum sozialen Konto wurde entfernt.
|
||||
|
||||
manage_access_token=Verwaltung persönlicher Zugangs-Tokens
|
||||
generate_new_token=Neues Token erzeugen
|
||||
tokens_desc=Die von dir erzeugten Tokens können zum Zugriff auf die Gogs-API verwendet werden.
|
||||
new_token_desc=Momentan erlaubt jedes Token vollen Zugriff auf dein Konto.
|
||||
token_name=Token-Name
|
||||
generate_token=Token erzeugen
|
||||
generate_token_succees=Neues Zugangs-Token wurde erstellt! Bitte kopiere dein persönliches Zugangs-Token jetzt. Du wirst es später nicht mehr anzeigen können!
|
||||
delete_token=Löschen
|
||||
delete_token_success=Persönliches Zugangs-Token wurde gelöscht! Vergiss nicht, auch deine Anwendungen zu aktualisieren.
|
||||
|
||||
delete_account=Konto löschen
|
||||
delete_prompt=Diese Aktion wird dein Konto dauerhaft löschen und kann <strong>NICHT</strong> rückgängig gemacht werden!
|
||||
confirm_delete_account=Löschen
|
||||
delete_account_title=Account löschen
|
||||
delete_account_desc=Du bist dabei dieses Konto dauerhaft zu löschen, willst du fortfahren?
|
||||
|
||||
[repo]
|
||||
owner=Besitzer
|
||||
repo_name=Repository-Name
|
||||
repo_name_helper=Gute Repository-Namen sind kurz, einprägsam und <strong>einzigartig</strong>.
|
||||
visibility=Sichtbarkeit
|
||||
visiblity_helper=Dieses Repository ist <span class="label label-red label-radius">Privat</span>
|
||||
fork_repo=Repository abspalten
|
||||
fork_from=Abspaltung von
|
||||
fork_visiblity_helper=Sichtbarkeit von abgespalteten Repositories ist nicht veränderbar
|
||||
repo_desc=Beschreibung
|
||||
repo_lang=Sprache
|
||||
repo_lang_helper=Wähle eine .gitignore Datei
|
||||
license=Lizenz
|
||||
license_helper=Wähle eine Lizenz aus
|
||||
init_readme=Repository mit README.md initialisieren
|
||||
create_repo=Repository erstellen
|
||||
default_branch=Standard-Branch
|
||||
mirror_interval=Spiegel-Intervall (in Stunden)
|
||||
goget_meta=Go-Get Meta
|
||||
goget_meta_helper=Dieses Repository wird man mit <span class="label label-blue label-radius">go get</span> klonen können.
|
||||
|
||||
need_auth=Authorisierung benötigt
|
||||
migrate_type=Migrationstyp
|
||||
migrate_type_helper=Dieses Repository wird ein <span class="label label-blue label-radius">Spiegel</span>
|
||||
migrate_repo=Repository migrieren
|
||||
|
||||
copy_link=Kopieren
|
||||
click_to_copy=In Zwischenablage kopieren
|
||||
copied=Kopiert OK
|
||||
clone_helper=Du brauchst Hilfe beim Klonen? Hier gibt es <a target="_blank" href="%s">Hilfe</a>!
|
||||
unwatch=Beobachtung beenden
|
||||
watch=Beobachtung
|
||||
unstar=Markierung aufheben
|
||||
star=Markierung
|
||||
fork=Abspaltung
|
||||
|
||||
no_desc=Keine Beschreibung
|
||||
quick_guide=Kurzanleitung
|
||||
clone_this_repo=Dieses Repository klonen
|
||||
create_new_repo_command=Erstelle ein neues Repository mittels der Kommandozeile
|
||||
push_exist_repo=Übertrage ein existierendes Repository von der Kommandozeile
|
||||
|
||||
branch=Branch
|
||||
tree=Struktur
|
||||
branch_and_tags=Branches & Tags
|
||||
branches=Branches
|
||||
tags=Markierungen
|
||||
issues=Issues
|
||||
commits=Commits
|
||||
releases=Veröffentlichungen
|
||||
file_raw=Roh
|
||||
file_history=Verlauf
|
||||
file_view_raw=Ansicht Roh
|
||||
|
||||
commits.commits=Commits
|
||||
commits.search=Durchsuche Commits
|
||||
commits.find=Finden
|
||||
commits.author=Author
|
||||
commits.message=Mitteilung
|
||||
commits.date=Datum
|
||||
commits.older=Älter
|
||||
commits.newer=Neuer
|
||||
|
||||
settings=Einstellungen
|
||||
settings.options=Optionen
|
||||
settings.collaboration=Zusammenarbeit
|
||||
settings.hooks=Webhooks
|
||||
settings.githooks=Git-Hooks
|
||||
settings.deploy_keys=Deploy-Keys
|
||||
settings.basic_settings=Grundeinstellungen
|
||||
settings.danger_zone=Gefahrenzone
|
||||
settings.site=Offizielle Webseite
|
||||
settings.update_settings=Aktualisierungseinstellungen
|
||||
settings.change_reponame=Name des Repositories geändert
|
||||
settings.change_reponame_desc=Repository-Name wurde geändert, möchtest du fortfahren? Dies beeinträchtigt sämtliche Links, die dieses Repository betreffen.
|
||||
settings.transfer=Besitz übertragen
|
||||
settings.transfer_desc=Übertrage dieses Repository einem anderen Benutzer oder einer Organisation.
|
||||
settings.new_owner_has_same_repo=Neuer Eigentümer hat bereits ein Repository mit dem gleichen Namen.
|
||||
settings.delete=Repository löschen
|
||||
settings.delete_desc=Wenn dieses Repository gelöscht ist, gibt es keinen Weg zurück. Sei dir sicher!
|
||||
settings.transfer_notices=<p>- Du wirst den Zugriff verlieren, falls der neue Besitzer ein einzelner Benutzer ist.</p><p>- Du wirst deinen Zugang behalten, falls der neue Besitzer eine Organisation ist, und du zu ihren Besitzern gehörst.</p>
|
||||
settings.update_settings_success=Repository-Optionen aktualisiert
|
||||
settings.transfer_owner=Neuer Besitzer
|
||||
settings.make_transfer=übertragen
|
||||
settings.transfer_succeed=Repository-Eigentum wurde erfolgreich übertragen.
|
||||
settings.confirm_delete=Löschen
|
||||
settings.add_collaborator=Mitarbeiter hinzufügen
|
||||
settings.add_collaborator_success=Mitarbeiter hinzugefügt
|
||||
settings.remove_collaborator_success=Mitarbeiter entfernt
|
||||
settings.user_is_org_member=Benutzer ist ein Organisationsmitglied und kann nicht als Mitarbeiter hinzugefügt werden.
|
||||
settings.add_webhook=Webhook hinzufügen
|
||||
settings.hooks_desc=Webhooks erlauben es externe Dienste zu informieren, wenn etwas bestimmtes in deinem Repository passiert. GoGS sendet dann eine POST-Request an alle angegebenen URLs. Erfahre mehr in unserem <a target="_blank" href="%s">Webhooks Guide</a>.
|
||||
settings.githooks_desc=Git-Hooks werden von Git selbst bereitgestellt. Du kannst die Dateien der unterstützten Hooks in der Liste unten bearbeiten, um eigene Operationen einzubinden.
|
||||
settings.githook_edit_desc=Wenn ein Hook nicht aktiv ist, wird der Standardinhalt benutzt. Lasse den Inhalt leer, um den Hook zu deaktivieren.
|
||||
settings.githook_name=Hook-Name
|
||||
settings.githook_content=Hook-Inhalt
|
||||
settings.update_githook=Aktualisiere Hook
|
||||
settings.remove_hook_success=Webhook entfernt
|
||||
settings.add_webhook_desc=GoGS sendet einen <code>POST</code>-Request an die unten stehende URL mit Details aller abonnierten Ereignisse. Du kannst auch angeben, welches Datenformat du erhalten willst (JSON, <code>x-www-form-urlencoded</code>, <em>etc</em>). Mehr Informationen findest du im <a target="_blank" href="%s">Webhooks Guide</a>.
|
||||
settings.payload_url=Payload-URL
|
||||
settings.content_type=Inhaltstyp
|
||||
settings.secret=Secret
|
||||
settings.event_desc=Welche Ereignisse sollen diesen Webhook auslösen?
|
||||
settings.event_push_only=Nur das <code>push</code>-Ereignis.
|
||||
settings.active=Aktiv
|
||||
settings.active_helper=Ereignisdetails werden ausgeliefert, wenn dieser Webhook ausgelöst wird.
|
||||
settings.add_hook_success=Webhook hinzugefügt
|
||||
settings.update_webhook=Webhook aktualisieren
|
||||
settings.update_hook_success=Webhook aktualisiert
|
||||
settings.delete_webhook=Webhook löschen
|
||||
settings.recent_deliveries=letzte Zustellungen
|
||||
settings.hook_type=Hook Typ
|
||||
settings.add_slack_hook_desc=Füge <a href="%s">Slack</a>-Integration zu deinem Repository hinzu.
|
||||
settings.slack_token=Token
|
||||
settings.slack_domain=Domain
|
||||
settings.slack_channel=Kanal
|
||||
|
||||
diff.browse_source=Quellcode durchsuchen
|
||||
diff.parent=Ursprung
|
||||
diff.commit=Commit
|
||||
diff.data_not_available=Keine Diff-Daten verfügbar.
|
||||
diff.show_diff_stats=Diff-Statistik anzeigen
|
||||
diff.stats_desc=<strong> %d geänderte Dateien</strong> mit <strong>%d neuen Zeilen</strong> und <strong>%d gelöschten Zeilen</strong>
|
||||
diff.bin=BIN
|
||||
diff.view_file=Datei anzeigen
|
||||
|
||||
release.releases=Releases
|
||||
release.new_release=Neues Release
|
||||
release.draft=Entwurf
|
||||
release.prerelease=Pre-Release
|
||||
release.stable=Endversion
|
||||
release.edit=bearbeiten
|
||||
release.ahead=<strong>%d</strong> Commits zu %s seit diesem Release
|
||||
release.source_code=Quelltext
|
||||
release.tag_name=Tag-Name
|
||||
release.target=Ziel
|
||||
release.tag_helper=Wähle ein neues Tag oder erstelle ein Tag beim Veröffentlichen.
|
||||
release.release_title=Release-Titel
|
||||
release.content_with_md=Inhalt mit <a href="%s">Markdown</a>
|
||||
release.write=Schreiben
|
||||
release.preview=Vorschau
|
||||
release.content_placeholder=Schreibe hier etwas
|
||||
release.loading=Laden…
|
||||
release.prerelease_desc=Dies ist eine Pre-Release-Version
|
||||
release.prerelease_helper=Wir möchten darauf hinweisen, dass dieses Release nicht für den produktiven Einsatz gedacht ist.
|
||||
release.publish=Release veröffentlichen
|
||||
release.save_draft=Entwurf speichern
|
||||
release.edit_release=Release bearbeiten
|
||||
release.tag_name_already_exist=Ein Release mit diesem Tag existiert bereits.
|
||||
|
||||
[org]
|
||||
org_name_holder=Name der Organisation
|
||||
org_name_helper=Gute Namen von Organisationen sind kurz und einprägsam.
|
||||
org_email_helper=Das E-Mail-Konto der Organisation empfängt alle Benachrichtigungen.
|
||||
create_org=Organisation erstellen
|
||||
repo_updated=Aktualisiert
|
||||
people=Personen
|
||||
invite_someone=Benutzer einladen
|
||||
teams=Teams
|
||||
lower_members=Mitglieder
|
||||
lower_repositories=Repositorys
|
||||
create_new_team=Neues Team erstellen
|
||||
org_desc=Beschreibung
|
||||
team_name=Teamname
|
||||
team_desc=Beschreibung
|
||||
team_name_helper=Verwende diesen Namen, um dich auf dieses Team zu beziehen.
|
||||
team_desc_helper=Was hat es mit diesem Team auf sich?
|
||||
team_permission_desc=Welche Berechtigungsstufe soll das Team haben?
|
||||
|
||||
settings=Einstellungen
|
||||
settings.options=Optionen
|
||||
settings.full_name=Vollständiger Name
|
||||
settings.website=Webseite
|
||||
settings.location=Standort
|
||||
settings.update_settings=Aktualisierungseinstellungen
|
||||
settings.change_orgname=Organisationsname geändert
|
||||
settings.change_orgname_desc=Organisationsname wurde geändert, möchtest du fortfahren? Dies beeinträchtigt sämtliche Links, die diese Organisation betreffen.
|
||||
settings.update_setting_success=Organisationseinstellungen aktualisiert
|
||||
settings.delete=Organisation löschen
|
||||
settings.delete_account=Diese Organisation löschen
|
||||
settings.delete_prompt=Die Organisation wird dauerhaft gelöscht. Dies kann <strong>NICHT</strong> rückgängig gemacht werden!
|
||||
settings.confirm_delete_account=Löschen
|
||||
settings.delete_org_title=Organisation löschen
|
||||
settings.delete_org_desc=Diese Organisation wird dauerhaft gelöscht, möchtest du fortfahren?
|
||||
settings.hooks_desc=Füge Webhooks hinzu, die für <strong>alle</strong> Repositorys dieser Organisation ausgelöst werden.
|
||||
|
||||
members.public=Öffentlich
|
||||
members.public_helper=Privat machen
|
||||
members.private=Privat
|
||||
members.private_helper=Öffentlich machen
|
||||
members.owner=Besitzer
|
||||
members.member=Mitglied
|
||||
members.conceal=Verbergen
|
||||
members.remove=Entfernen
|
||||
members.leave=Verlassen
|
||||
members.invite_desc=Benutzernamen eingeben, um ihn als neues Mitglied in %s einzuladen:
|
||||
members.invite_now=Jetzt einladen
|
||||
|
||||
teams.join=Beitreten
|
||||
teams.leave=Verlassen
|
||||
teams.read_access=Lesezugriff
|
||||
teams.read_access_helper=Dieses Team wird Repositorys einsehen und klonen können.
|
||||
teams.write_access=Schreibzugriff
|
||||
teams.write_access_helper=Dieses Team wird die Repositorys einsehen und in sie hinein pushen können.
|
||||
teams.admin_access=Adminzugriff
|
||||
teams.admin_access_helper=Dieses Team wird pull- und push-Rechte für die Repositorys haben und Mitarbeiter einladen können.
|
||||
teams.no_desc=Dieses Team hat keine Beschreibung
|
||||
teams.settings=Einstellungen
|
||||
teams.owners_permission_desc=Besitzer haben vollen Zugriff auf <strong>alle Repositorys</strong> und <strong>Admin Rechte</strong> für diese Organisation.
|
||||
teams.members=Teammitglieder
|
||||
teams.update_settings=Einstellungen aktualisieren
|
||||
teams.delete_team=Dieses Team löschen
|
||||
teams.add_team_member=Teammitglied hinzufügen
|
||||
teams.delete_team_title=Team löschen
|
||||
teams.delete_team_desc=Dieses Team wird gelöscht, möchtest du fortfahren? Mitglieder dieses Teams verlieren möglicherweise ihren Zugang zu einigen Repositories.
|
||||
teams.delete_team_success=Team gelöscht
|
||||
teams.read_permission_desc=Dieses Team hat <strong>Lesezugriff</strong>: Mitglieder können Team-Repositories einsehen und klonen.
|
||||
teams.write_permission_desc=Dieses Team erlaubt <strong>Schreibzugriff</strong>: Mitglieder können Team-Repositorys einsehen und hinein pushen.
|
||||
teams.admin_permission_desc=Diese Team erlaubt <strong>Adminzugriff</strong>: Mitglieder dieses Teams können pullen, pushen und dem Team Mitarbeiter hinzufügen.
|
||||
teams.repositories=Team-Repositorys
|
||||
teams.add_team_repository=Team-Repository hinzufügen
|
||||
teams.remove_repo=Entfernen
|
||||
teams.add_nonexistent_repo=Das Repository, das du hinzufügen willst, existiert nicht. Bitte erstelle es zuerst.
|
||||
|
||||
[admin]
|
||||
dashboard=Dashboard
|
||||
users=Benutzer
|
||||
organizations=Organisationen
|
||||
repositories=Repositorys
|
||||
authentication=Authentifizierung
|
||||
config=Konfiguration
|
||||
notices=System-Mitteilungen
|
||||
monitor=Monitoring
|
||||
prev=zurück
|
||||
next=vor
|
||||
|
||||
dashboard.statistic=Statistik
|
||||
dashboard.operations=Operationen
|
||||
dashboard.system_status=System-Monitor-Status
|
||||
dashboard.statistic_info=GoGS Datenbank hat <b>%d</b> Benutzer, <b>%d</b> Organisationen, <b>%d</b> öffentliche Schlüssel, <b>%d</b> Repositorys, <b>%d</b> Beobachtungen, <b>%d</b> Markierungen, <b>%d</b> Aktionen, <b>%d</b> Zugriffe, <b>%d</b> Issues, <b>%d</b> Kommentare, <b>%d</b> soziale Konten, <b>%d</b> Folgende, <b>%d</b> Spiegel, <b>%d</b> Releases, <b>%d</b> Login-Quellen, <b>%d</b> Webhooks, <b>%d</b> Milestones, <b>%d</b> Labels, <b>%d</b> Hook-Tasks, <b>%d</b> Teams, <b>%d</b> Aktualisierungs-Tasks, <b>%d</b> Anhänge.
|
||||
dashboard.operation_name=Name der Operation
|
||||
dashboard.operation_switch=Switch
|
||||
dashboard.operation_run=Ausführen
|
||||
dashboard.clean_unbind_oauth=ungebundene OAuths bereinigen
|
||||
dashboard.clean_unbind_oauth_success=Alle ungebundenen OAuth-Tokens wurden gelöscht.
|
||||
dashboard.delete_inactivate_accounts=inaktive Konten löschen
|
||||
dashboard.delete_inactivate_accounts_success=Alle inaktiven Konten wurden erfolgreich gelöscht.
|
||||
dashboard.delete_repo_archives=Alle Repository-Archive löschen
|
||||
dashboard.delete_repo_archives_success=Alle Repositoriy-Archive wurden gelöscht.
|
||||
dashboard.git_gc_repos=Führe Garbage Collection auf Repositories aus
|
||||
dashboard.git_gc_repos_success=Garbage Collection wurde auf allen Repositories erfolgreich ausgeführt.
|
||||
dashboard.server_uptime=Server-Uptime
|
||||
dashboard.current_goroutine=Aktuelle Goroutines
|
||||
dashboard.current_memory_usage=Aktuelle Speichernutzung
|
||||
dashboard.total_memory_allocated=Zugeteilter Gesamtspeicher
|
||||
dashboard.memory_obtained=Erhaltener Speicher
|
||||
dashboard.pointer_lookup_times=Pointer Lookup Times
|
||||
dashboard.memory_allocate_times=Memory Allocate Times
|
||||
dashboard.memory_free_times=Memory Free Times
|
||||
dashboard.current_heap_usage=Aktuelle Heap-Auslastung
|
||||
dashboard.heap_memory_obtained=erhaltener Heap-Memory
|
||||
dashboard.heap_memory_idle=unbenutzter Heap-Memory
|
||||
dashboard.heap_memory_in_use=benutzter Heap-Memory
|
||||
dashboard.heap_memory_released=freigegebener Heap-Memory
|
||||
dashboard.heap_objects=Heap-Objekte
|
||||
dashboard.bootstrap_stack_usage=Bootstrap-Stack-Auslastung
|
||||
dashboard.stack_memory_obtained=erhaltener Stack-Memory
|
||||
dashboard.mspan_structures_usage=MSpan-Structures-Auslastung
|
||||
dashboard.mspan_structures_obtained=erhaltene MSpan-Structures
|
||||
dashboard.mcache_structures_usage=MCache-Structures-Auslastung
|
||||
dashboard.mcache_structures_obtained=erhaltene MCache-Structures
|
||||
dashboard.profiling_bucket_hash_table_obtained=Profiling Bucket Hash Table Obtained
|
||||
dashboard.gc_metadata_obtained=erhaltene GC-Metadata
|
||||
dashboard.other_system_allocation_obtained=andere erhaltene System-Allokatoren
|
||||
dashboard.next_gc_recycle=nächster GC-Zyklus
|
||||
dashboard.last_gc_time=seit letztem GC-Zyklus
|
||||
dashboard.total_gc_time=gesammte GC-Zeit
|
||||
dashboard.total_gc_pause=gesammte GC-Pause
|
||||
dashboard.last_gc_pause=letzte GC-Pause
|
||||
dashboard.gc_times=GC-Takt
|
||||
|
||||
users.user_manage_panel=Benutzer
|
||||
users.new_account=Neues Konto erstellen
|
||||
users.name=Name
|
||||
users.activated=Aktiviert
|
||||
users.admin=Admin
|
||||
users.repos=Repositorys
|
||||
users.created=Erzeugt
|
||||
users.edit=Bearbeiten
|
||||
users.auth_source=Auth-Quelle
|
||||
users.local=Lokal
|
||||
users.auth_login_name=Auth-Login-Name
|
||||
users.update_profile_success=Kontoprofil aktualisiert
|
||||
users.edit_account=Konto bearbeiten
|
||||
users.is_activated=Dieses Konto ist aktiviert
|
||||
users.is_admin=Dieses Konto hat Administratorrechte
|
||||
users.allow_git_hook=Dieses Konto ist berechtigt, Git-Hooks zu erstellen
|
||||
users.update_profile=Kontoprofil aktualisieren
|
||||
users.delete_account=Dieses Konto löschen
|
||||
users.still_own_repo=Dieses Konto besitzt noch Repositorys. Diese müssen zuerst gelöscht oder übertragen werden.
|
||||
users.still_has_org=Dieses Konto ist noch Mitglied einer Organisation, bitte entferne diese Mitgliedschaft zuerst.
|
||||
|
||||
orgs.org_manage_panel=Organisationenverwaltung
|
||||
orgs.name=Name
|
||||
orgs.teams=Teams
|
||||
orgs.members=Mitglieder
|
||||
|
||||
repos.repo_manage_panel=Repositorys
|
||||
repos.owner=Besitzer
|
||||
repos.name=Name
|
||||
repos.private=Privat
|
||||
repos.watches=Beobachtungen
|
||||
repos.stars=Markierungen
|
||||
repos.issues=Issues
|
||||
|
||||
auths.auth_manage_panel=Authentifizierung
|
||||
auths.new=Neue Authentifizierungsquelle hinzufügen
|
||||
auths.name=Name
|
||||
auths.type=Typ
|
||||
auths.enabled=aktiviert
|
||||
auths.updated=aktualisiert
|
||||
auths.auth_type=Authentifizierungstyp
|
||||
auths.auth_name=Authentifizierungsname
|
||||
auths.domain=Domain
|
||||
auths.host=Host
|
||||
auths.port=Port
|
||||
auths.base_dn=Base DN
|
||||
auths.attributes=Suchattribute
|
||||
auths.filter=Suchfilter
|
||||
auths.ms_ad_sa=Ms Ad SA
|
||||
auths.smtp_auth=SMTP-Authentifizierungstyp
|
||||
auths.smtphost=SMTP-Host
|
||||
auths.smtpport=SMTP-Port
|
||||
auths.enable_tls=TLS-Verschlüsselung aktivieren
|
||||
auths.enable_auto_register=Automatische Registrierung aktivieren
|
||||
auths.tips=Tipps
|
||||
auths.edit=Authentifizierungseinstellungen bearbeiten
|
||||
auths.activated=Diese Authentifizierung ist aktiviert
|
||||
auths.update_success=Authentifizierungseinstellungen aktualisiert
|
||||
auths.update=Authentifizierungseinstellungen aktualisieren
|
||||
auths.delete=Authentifizierung löschen
|
||||
auths.delete_auth_title=Authentifizierungsquelle löschen
|
||||
auths.delete_auth_desc=Diese Authentifizierungsquelle wird gelöscht, möchtest du fortfahren?
|
||||
|
||||
config.server_config=Server-Konfiguration
|
||||
config.app_name=Anwendungsname
|
||||
config.app_ver=Anwendungsversion
|
||||
config.app_url=Anwendungs-URL
|
||||
config.domain=Domain
|
||||
config.offline_mode=Offline-Modus
|
||||
config.disable_router_log=Router-Log deaktivieren
|
||||
config.run_user=Laufzeit-Benutzer
|
||||
config.run_mode=Laufzeit-Modus
|
||||
config.repo_root_path=Repository-Verzeichnis
|
||||
config.static_file_root_path=Verzeichnis für statische Dateien
|
||||
config.log_file_root_path=Log-Verzeichnis
|
||||
config.script_type=Skript-Typ
|
||||
config.reverse_auth_user=Nutzer bei Reverse-Authentifizierung
|
||||
config.db_config=Datenbankkonfiguration
|
||||
config.db_type=Typ
|
||||
config.db_host=Host
|
||||
config.db_name=Name
|
||||
config.db_user=Benutzer
|
||||
config.db_ssl_mode=SSL-Modus
|
||||
config.db_ssl_mode_helper=(nur für "postgres")
|
||||
config.db_path=Verzeichnis
|
||||
config.db_path_helper=(nur für "sqlite3")
|
||||
config.service_config=Service-Einstellungen
|
||||
config.register_email_confirm=E-Mail-Bestätigung bei Registrierung
|
||||
config.disable_register=Registrierung deaktivieren
|
||||
config.require_sign_in_view=Ansehen erfordert Registrierung
|
||||
config.mail_notify=E-Mail-Benachrichtigung
|
||||
config.enable_cache_avatar=Avatar-Cache aktivieren
|
||||
config.active_code_lives=Aktivierungscode Lebensdauer
|
||||
config.reset_password_code_lives=Passwortcode Lebensdauer
|
||||
config.webhook_config=Webhook-Einstellungen
|
||||
config.task_interval=Task-Intervall
|
||||
config.deliver_timeout=Zeitlimit für Zustellung
|
||||
config.mailer_config=Mailer-Einstellungen
|
||||
config.mailer_enabled=Aktiviert
|
||||
config.mailer_name=Name
|
||||
config.mailer_host=Host
|
||||
config.mailer_user=Benutzer
|
||||
config.oauth_config=OAuth-Einstellungen
|
||||
config.oauth_enabled=Aktiviert
|
||||
config.cache_config=Cache-Einstellungen
|
||||
config.cache_adapter=Cache-Adapter
|
||||
config.cache_interval=Cache-Intervall
|
||||
config.cache_conn=Cache-Anbindung
|
||||
config.session_config=Session-Einstellungen
|
||||
config.session_provider=Session-Provider
|
||||
config.provider_config=Provider-Einstellungen
|
||||
config.cookie_name=Cookie-Name
|
||||
config.enable_set_cookie=Cookies einschalten
|
||||
config.gc_interval_time=GC-Intervallzeit
|
||||
config.session_life_time=Session-Lebensdauer
|
||||
config.https_only=nur HTTPS
|
||||
config.cookie_life_time=Cookie-Lebensdauer
|
||||
config.picture_config=Bildeinstellungen
|
||||
config.picture_service=Bildservice
|
||||
config.disable_gravatar=Gravatar deaktivieren
|
||||
config.log_config=Log-Einstellungen
|
||||
config.log_mode=Log-Modus
|
||||
|
||||
monitor.cron=Cron-Tasks
|
||||
monitor.name=Name
|
||||
monitor.schedule=Zeitplan
|
||||
monitor.next=nächste Ausführung
|
||||
monitor.previous=letzte Ausführung
|
||||
monitor.execute_times=Anzahl Ausführungen
|
||||
monitor.process=Laufende Prozesse
|
||||
monitor.desc=Beschreibung
|
||||
monitor.start=Startzeit
|
||||
monitor.execute_time=Ausführungszeit
|
||||
|
||||
notices.system_notice_list=System-Mitteilungen
|
||||
notices.type=Typ
|
||||
notices.type_1=Repository
|
||||
notices.desc=Beschreibung
|
||||
notices.op=Op.
|
||||
notices.delete_success=System-Mitteilung erfolgreich gelöscht.
|
||||
|
||||
[action]
|
||||
create_repo=hat Repository <a href="%s/%s">%s</a> erstellt
|
||||
commit_repo=hat nach <a href="%s/%s/src/%s">%s</a> in <a href="%s/%s">%s</a> gepusht
|
||||
create_issue=hat Issue <a href="%s/%s/issues/%s">%s#%s</a> eröffnet
|
||||
comment_issue=hat Issue <a href="%s/%s/issues/%s">%s#%s</a> kommentiert
|
||||
transfer_repo=hat Repository <code>%s</code> transferiert an <a href="/%s%s">%s</a>
|
||||
push_tag=hat nach <a href="%s/%s/src/%s">%s</a> in <a href="%s/%s">%s</a> gepusht
|
||||
compare_2_commits=Zeige Vergleich dieser 2 Commits
|
||||
|
||||
[tool]
|
||||
ago=vor
|
||||
from_now=ab sofort
|
||||
now=Jetzt
|
||||
1s=%s 1 Sekunde
|
||||
1m=%s 1 Minute
|
||||
1h=%s 1 Stunde
|
||||
1d=%s 1 Tag
|
||||
1w=%s 1 Woche
|
||||
1mon=%s 1 Monat
|
||||
1y=%s 1 Jahr
|
||||
seconds=%[2]s %[1]d Sekunden
|
||||
minutes=%[2]s %[1]d Minuten
|
||||
hours=%[2]s %[1]d Stunden
|
||||
days=%[2]s %[1]d Tagen
|
||||
weeks=%[2]s %[1]d Wochen
|
||||
months=%[2]s %[1]d Monaten
|
||||
years=%[2]s %[1]d Jahren
|
||||
raw_seconds=Sekunden
|
||||
raw_minutes=Minuten
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
717
conf/locale/locale_en-US.ini
Normal file
717
conf/locale/locale_en-US.ini
Normal file
@@ -0,0 +1,717 @@
|
||||
app_desc = A painless self-hosted Git service written in Go
|
||||
|
||||
home = Home
|
||||
dashboard = Dashboard
|
||||
explore = Explore
|
||||
help = Help
|
||||
sign_in = Sign In
|
||||
social_sign_in = Social Sign In: 2nd Step <small>associate account</small>
|
||||
sign_out = Sign Out
|
||||
sign_up = Sign Up
|
||||
register = Register
|
||||
website = Website
|
||||
version = Version
|
||||
page = Page
|
||||
template = Template
|
||||
language = Language
|
||||
|
||||
username = Username
|
||||
email = E-mail
|
||||
password = Password
|
||||
re_type = Re-Type
|
||||
captcha = Captcha
|
||||
|
||||
repository = Repository
|
||||
organization = Organization
|
||||
mirror = Mirror
|
||||
new_repo = New Repository
|
||||
new_migrate = New Migration
|
||||
new_fork = New Fork Repository
|
||||
new_org = New Organization
|
||||
manage_org = Manage Organizations
|
||||
admin_panel = Admin Panel
|
||||
account_settings = Account Settings
|
||||
settings = Settings
|
||||
|
||||
news_feed = News Feed
|
||||
pull_requests = Pull Requests
|
||||
issues = Issues
|
||||
|
||||
cancel = Cancel
|
||||
|
||||
[install]
|
||||
install = Installation
|
||||
title = Install Steps For First-time Run
|
||||
requite_db_desc = Gogs requires MySQL, PostgreSQL or SQLite3.
|
||||
db_type = Database Type
|
||||
host = Host
|
||||
user = User
|
||||
password = Password
|
||||
db_name = Database Name
|
||||
db_helper = Please use INNODB engine with utf8_general_ci charset for MySQL.
|
||||
ssl_mode = SSL Mode
|
||||
path = Path
|
||||
sqlite_helper = The file path of SQLite3 database.
|
||||
general_title = General Settings of Gogs
|
||||
repo_path = Repository Root Path
|
||||
repo_path_helper = All Git remote repositories will be saved to this directory.
|
||||
run_user = Run User
|
||||
run_user_helper = The user must have access to Repository Root Path and run Gogs.
|
||||
domain = Domain
|
||||
domain_helper = This affects SSH clone URLs.
|
||||
app_url = Application URL
|
||||
app_url_helper = This affects HTTP/HTTPS clone URL and somewhere in e-mail.
|
||||
email_title = Email Service Settings(Optional)
|
||||
smtp_host = SMTP Host
|
||||
mailer_user = Sender E-mail
|
||||
mailer_password = Sender Password
|
||||
notify_title = Notification Settings(Optional)
|
||||
register_confirm = Enable Register Confirmation
|
||||
mail_notify = Enable Mail Notification
|
||||
admin_title = Admin Account Settings
|
||||
admin_name = Username
|
||||
admin_password = Password
|
||||
confirm_password = Confirm Password
|
||||
admin_email = E-mail
|
||||
install_gogs = Install Gogs
|
||||
test_git_failed = Fail to test 'git' command: %v
|
||||
sqlite3_not_available = Your release version does not support SQLite3, please download the official binary version from %s, NOT the gobuild version.
|
||||
invalid_db_setting = Database setting is not correct: %v
|
||||
invalid_repo_path = Repository root path is invalid: %v
|
||||
run_user_not_match = Run user isn't the current user: %s -> %s
|
||||
save_config_failed = Fail to save configuration: %v
|
||||
invalid_admin_setting = Admin account setting is invalid: %v
|
||||
install_success = Welcome! We're glad that you choose Gogs, have fun and take care.
|
||||
|
||||
[home]
|
||||
uname_holder = Username or E-mail
|
||||
password_holder = Password
|
||||
switch_dashboard_context = Switch Dashboard Context
|
||||
my_repos = My Repositories
|
||||
collaborative_repos = Collaborative Repositories
|
||||
my_orgs = My Organizations
|
||||
my_mirrors = My Mirrors
|
||||
|
||||
[explore]
|
||||
repos = Repositories
|
||||
|
||||
[auth]
|
||||
create_new_account = Create New Account
|
||||
register_hepler_msg = Already have an account? Sign in now!
|
||||
social_register_hepler_msg = Already have an account? Bind now!
|
||||
disable_register_prompt = Sorry, registration has been disabled. Please contact the site administrator.
|
||||
disable_register_mail = Sorry, Register Mail Confirmation has been disabled.
|
||||
remember_me = Remember Me
|
||||
forgot_password= Forgot Password
|
||||
forget_password = Forgot password?
|
||||
sign_up_now = Need an account? Sign up now.
|
||||
confirmation_mail_sent_prompt = A new confirmation e-mail has been sent to <b>%s</b>, please check your inbox within the next %d hours to complete your registration.
|
||||
sign_in_email = Sign in to your e-mail
|
||||
active_your_account = Activate Your Account
|
||||
resent_limit_prompt = Sorry, you are sending an activation e-mail too frequently. Please wait 3 minutes.
|
||||
has_unconfirmed_mail = Hi %s, you have an unconfirmed email address(<b>%s</b>). If you haven't received a confirmation e-mail or need to resend a new one, please click on the button below.
|
||||
resend_mail = Click here to resend your activation e-mail
|
||||
email_not_associate = This e-mail address does not associate to any account.
|
||||
send_reset_mail = Click here to (re)send your password reset e-mail
|
||||
reset_password = Reset Your Password
|
||||
invalid_code = Sorry, your confirmation code has expired or not valid.
|
||||
reset_password_helper = Click here to reset your password
|
||||
password_too_short = Password length cannot be less then 6.
|
||||
|
||||
[form]
|
||||
UserName = Username
|
||||
RepoName = Repository name
|
||||
Email = E-mail address
|
||||
Password = Password
|
||||
Retype = Re-type password
|
||||
SSHTitle = SSH key name
|
||||
HttpsUrl = HTTPS URL
|
||||
PayloadUrl = Payload URL
|
||||
TeamName = Team name
|
||||
AuthName = Authorization name
|
||||
AdminEmail = Admin E-mail
|
||||
|
||||
require_error = ` cannot be empty.`
|
||||
alpha_dash_error = ` must be valid alpha or numeric or dash(-_) characters.`
|
||||
alpha_dash_dot_error = ` must be valid alpha or numeric or dash(-_) or dot characters.`
|
||||
min_size_error = ` must contain at least %s characters.`
|
||||
max_size_error = ` must contain at most %s characters.`
|
||||
email_error = ` is not a valid e-mail address.`
|
||||
url_error = ` is not a valid URL.`
|
||||
unknown_error = Unknown error:
|
||||
captcha_incorrect = Captcha didn't match.
|
||||
password_not_match = Password and confirm password are not same.
|
||||
|
||||
username_been_taken = Username has been already taken.
|
||||
repo_name_been_taken = Repository name has been already taken.
|
||||
org_name_been_taken = Organization name has been already taken.
|
||||
team_name_been_taken = Team name has been already taken.
|
||||
email_been_used = E-mail address has been already used.
|
||||
ssh_key_been_used = Public key name has been used.
|
||||
illegal_username = Your username contains illegal characters.
|
||||
illegal_repo_name = Repository name contains illegal characters.
|
||||
illegal_org_name = Organization name contains illegal characters.
|
||||
illegal_team_name = Team name contains illegal characters.
|
||||
username_password_incorrect = Username or password is not correct.
|
||||
enterred_invalid_repo_name = Please make sure you entered repository name is correct.
|
||||
enterred_invalid_owner_name = Please make sure you entered owner name is correct.
|
||||
enterred_invalid_password = Please make sure you entered password is correct.
|
||||
user_not_exist = Given user does not exist.
|
||||
last_org_owner = The user to remove is the last member in owner team. There must be another owner.
|
||||
|
||||
invalid_ssh_key = Sorry, we're not able to verify your SSH key: %s
|
||||
unable_verify_ssh_key = Gogs cannot verify your SSH key, but we assume that is valid, please make sure yourself.
|
||||
auth_failed = Authentication failed: %v
|
||||
|
||||
still_own_repo = Your account still have ownership of repository, you have to delete or transfer them first.
|
||||
still_has_org = Your account still have membership of organization, you have to left or delete them first.
|
||||
org_still_own_repo = This organization still have ownership of repository, you have to delete or transfer them first.
|
||||
|
||||
still_own_user = This authentication still has used by some users, you should move them and then delete again.
|
||||
|
||||
target_branch_not_exist = Target branch does not exist
|
||||
|
||||
[user]
|
||||
change_avatar = Change your avatar at gravatar.com
|
||||
change_custom_avatar = Change your avatar in settings
|
||||
join_on = Joined on
|
||||
repositories = Repositories
|
||||
activity = Public Activity
|
||||
followers = Followers
|
||||
starred = Starred
|
||||
following = Following
|
||||
|
||||
[settings]
|
||||
profile = Profile
|
||||
password = Password
|
||||
ssh_keys = SSH Keys
|
||||
social = Social Accounts
|
||||
applications = Applications
|
||||
orgs = Organizations
|
||||
delete = Delete Account
|
||||
uid = Uid
|
||||
|
||||
public_profile = Public Profile
|
||||
profile_desc = Your Email address is public and will be used for any account related notifications, and any web based operations made via the site.
|
||||
full_name = Full Name
|
||||
website = Website
|
||||
location = Location
|
||||
update_profile = Update Profile
|
||||
update_profile_success = Your profile has been updated successfully.
|
||||
change_username = Username Changed
|
||||
change_username_desc = Username has been changed, do you want to continue? This will affect all links relate to your account.
|
||||
continue = Continue
|
||||
cancel = Cancel
|
||||
|
||||
enable_custom_avatar = Enable Custom Avatar
|
||||
enable_custom_avatar_helper = Enable this to disable fetch from Gravatar
|
||||
choose_new_avatar = Choose new avatar
|
||||
update_avatar = Update Avatar Setting
|
||||
uploaded_avatar_not_a_image = Uploaded file is not a image.
|
||||
no_custom_avatar_available = No custom avatar available, cannot enable it.
|
||||
update_avatar_success = Your avatar setting has been updated successfully.
|
||||
|
||||
change_password = Change Password
|
||||
old_password = Current Password
|
||||
new_password = New Password
|
||||
password_incorrect = Current password is not correct.
|
||||
change_password_success = Password is changed successfully. You can now sign in via new password.
|
||||
|
||||
manage_ssh_keys = Manage SSH Keys
|
||||
add_key = Add Key
|
||||
ssh_desc = This is a list of SSH keys associated with your account. Remove any keys that you do not recognize.
|
||||
ssh_helper = <strong>Need help?</strong> Check out our guide to <a href="%s">generating SSH keys</a> or troubleshoot <a href="%s">common SSH Problems</a>.
|
||||
add_new_key = Add SSH Key
|
||||
key_name = Key Name
|
||||
key_content = Content
|
||||
add_key_success = New SSH Key has been added!
|
||||
delete_key = Delete
|
||||
add_on = Added on
|
||||
last_used = Last used on
|
||||
no_activity = No recent activity
|
||||
|
||||
manage_social = Manage Associated Social Accounts
|
||||
social_desc = This is a list of associated social accounts. Remove any binding that you do not recognize.
|
||||
unbind = Unbind
|
||||
unbind_success = Social account has been unbound.
|
||||
|
||||
manage_access_token = Manage Personal Access Tokens
|
||||
generate_new_token = Generate New Token
|
||||
tokens_desc = Tokens you have generated that can be used to access the Gogs API.
|
||||
new_token_desc = As for now, every token will have full access to your account.
|
||||
token_name = Token Name
|
||||
generate_token = Generate Token
|
||||
generate_token_succees = New access token has been generated successfully! Make sure to copy your new personal access token now. You won't be able to see it again!
|
||||
delete_token = Delete
|
||||
delete_token_success = Personal access token has been deleted successfully! Don't forget to update your applications as well.
|
||||
|
||||
delete_account = Delete Your Account
|
||||
delete_prompt = The operation will delete your account permanently, and <strong>CANNOT</strong> be undone!
|
||||
confirm_delete_account = Confirm Deletion
|
||||
delete_account_title = Account Deletion
|
||||
delete_account_desc = This account is going to be deleted permanently, do you want to continue?
|
||||
|
||||
[repo]
|
||||
owner = Owner
|
||||
repo_name = Repository Name
|
||||
repo_name_helper = Great repository names are short, memorable and <strong>unique</strong>.
|
||||
visibility = Visibility
|
||||
visiblity_helper = This repository is <span class="label label-red label-radius">Private</span>
|
||||
fork_repo = Fork Repository
|
||||
fork_from = Fork From
|
||||
fork_visiblity_helper = Forked repository cannot change its visiblity
|
||||
repo_desc = Description
|
||||
repo_lang = Language
|
||||
repo_lang_helper = Select a .gitignore file
|
||||
license = License
|
||||
license_helper = Select a license file
|
||||
init_readme = Initialize this repository with a README.md
|
||||
create_repo = Create Repository
|
||||
default_branch = Default Branch
|
||||
mirror_interval = Mirror Interval(hour)
|
||||
goget_meta = Go-Get Meta
|
||||
goget_meta_helper = This repository will be <span class="label label-blue label-radius">Go-Getable</span>
|
||||
|
||||
need_auth = Need Authorization
|
||||
migrate_type = Migration Type
|
||||
migrate_type_helper = This repository will be a <span class="label label-blue label-radius">Mirror</span>
|
||||
migrate_repo = Migrate Repository
|
||||
|
||||
copy_link = Copy
|
||||
click_to_copy = Copy to clipboard
|
||||
copied = Copied OK
|
||||
clone_helper = Need help cloning? Visit <a target="_blank" href="%s">Help</a>!
|
||||
unwatch = Unwatch
|
||||
watch = Watch
|
||||
unstar = Unstar
|
||||
star = Star
|
||||
fork = Fork
|
||||
|
||||
no_desc = No Description
|
||||
quick_guide = Quick Guide
|
||||
clone_this_repo = Clone this repository
|
||||
create_new_repo_command = Create a new repository on the command line
|
||||
push_exist_repo = Push an existing repository from the command line
|
||||
|
||||
branch = Branch
|
||||
tree = Tree
|
||||
branch_and_tags = Branches & Tags
|
||||
branches = Branches
|
||||
tags = Tags
|
||||
issues = Issues
|
||||
commits = Commits
|
||||
releases = Releases
|
||||
file_raw = Raw
|
||||
file_history = History
|
||||
file_view_raw = View Raw
|
||||
|
||||
commits.commits = Commits
|
||||
commits.search = Search commits
|
||||
commits.find = Find
|
||||
commits.author = Author
|
||||
commits.message = Message
|
||||
commits.date = Date
|
||||
commits.older = Older
|
||||
commits.newer = Newer
|
||||
|
||||
settings = Settings
|
||||
settings.options = Options
|
||||
settings.collaboration = Collaboration
|
||||
settings.hooks = Webhooks
|
||||
settings.githooks = Git Hooks
|
||||
settings.deploy_keys = Deploy Keys
|
||||
settings.basic_settings = Basic Settings
|
||||
settings.danger_zone = Danger Zone
|
||||
settings.site = Official Site
|
||||
settings.update_settings = Update Settings
|
||||
settings.change_reponame = Repository Name Changed
|
||||
settings.change_reponame_desc = Repository name has been changed, do you want to continue? This will affect all links relate to this repository.
|
||||
settings.transfer = Transfer Ownership
|
||||
settings.transfer_desc = Transfer this repo to another user or to an organization where you have admin rights.
|
||||
settings.new_owner_has_same_repo = New owner already has a repository with same name.
|
||||
settings.delete = Delete This Repository
|
||||
settings.delete_desc = Once you delete a repository, there is no going back. Please be certain.
|
||||
settings.transfer_notices = <p>- You will lose access if new owner is a individual user.</p><p>- You will remain access if new owner is an organization and you're one of the owners.</p>
|
||||
settings.update_settings_success = Repository options has been updated successfully.
|
||||
settings.transfer_owner = New Owner
|
||||
settings.make_transfer = Make Transfer
|
||||
settings.transfer_succeed = Repository ownership has been transferred successfully.
|
||||
settings.confirm_delete = Confirm Deletion
|
||||
settings.add_collaborator = Add New Collaborator
|
||||
settings.add_collaborator_success = New collaborator has been added.
|
||||
settings.remove_collaborator_success = Collaborator has been removed.
|
||||
settings.user_is_org_member = User is organization member who cannot be added as a collaborator.
|
||||
settings.add_webhook = Add Webhook
|
||||
settings.hooks_desc = Webhooks allow external services to be notified when certain events happen on Gogs. When the specified events happen, we'll send a POST request to each of the URLs you provide. Learn more in our <a target="_blank" href="%s">Webhooks Guide</a>.
|
||||
settings.githooks_desc = Git Hooks are powered by Git itself, you can edit files of supported hooks in the list below to apply custom operations.
|
||||
settings.githook_edit_desc = If hook is not active, sample content will be presented. Leave content to be blank will disable this hook.
|
||||
settings.githook_name = Hook Name
|
||||
settings.githook_content = Hook Content
|
||||
settings.update_githook = Update Hook
|
||||
settings.remove_hook_success = Webhook has been removed.
|
||||
settings.add_webhook_desc = We’ll send a <code>POST</code> request to the URL below with details of any subscribed events. You can also specify which data format you'd like to receive (JSON, <code>x-www-form-urlencoded</code>, <em>etc</em>). More information can be found in <a target="_blank" href="%s">Webhooks Guide</a>.
|
||||
settings.payload_url = Payload URL
|
||||
settings.content_type = Content Type
|
||||
settings.secret = Secret
|
||||
settings.event_desc = Which events would you like to trigger this webhook?
|
||||
settings.event_push_only = Just the <code>push</code> event.
|
||||
settings.active = Active
|
||||
settings.active_helper = We will deliver event details when this hook is triggered.
|
||||
settings.add_hook_success = New webhook has been added.
|
||||
settings.update_webhook = Update Webhook
|
||||
settings.update_hook_success = Webhook has been updated.
|
||||
settings.delete_webhook = Delete Webhook
|
||||
settings.recent_deliveries = Recent Deliveries
|
||||
settings.hook_type = Hook Type
|
||||
settings.add_slack_hook_desc = Add <a href="%s">Slack</a> integration to your repository.
|
||||
settings.slack_token = Token
|
||||
settings.slack_domain = Domain
|
||||
settings.slack_channel = Channel
|
||||
|
||||
diff.browse_source = Browse Source
|
||||
diff.parent = parent
|
||||
diff.commit = commit
|
||||
diff.data_not_available = Diff Data Not Available.
|
||||
diff.show_diff_stats = Show Diff Stats
|
||||
diff.stats_desc = <strong> %d changed files</strong> with <strong>%d additions</strong> and <strong>%d deletions</strong>
|
||||
diff.bin = BIN
|
||||
diff.view_file = View File
|
||||
|
||||
release.releases = Releases
|
||||
release.new_release = New Release
|
||||
release.draft = Draft
|
||||
release.prerelease = Pre-Release
|
||||
release.stable = Stable
|
||||
release.edit = edit
|
||||
release.ahead = <strong>%d</strong> commits to %s since this release
|
||||
release.source_code = Source Code
|
||||
release.tag_name = Tag name
|
||||
release.target = Target
|
||||
release.tag_helper = Choose an existing tag, or create a new tag on publish.
|
||||
release.release_title = Release title
|
||||
release.content_with_md = Content with <a href="%s">Markdown</a>
|
||||
release.write = Write
|
||||
release.preview = Preview
|
||||
release.content_placeholder = Write some content
|
||||
release.loading = Loading...
|
||||
release.prerelease_desc = This is a pre-release
|
||||
release.prerelease_helper = We’ll point out that this release is identified as non-production ready.
|
||||
release.publish = Publish Release
|
||||
release.save_draft = Save Draft
|
||||
release.edit_release = Edit Release
|
||||
release.tag_name_already_exist = Release with this tag name has already existed.
|
||||
|
||||
[org]
|
||||
org_name_holder = Organization Name
|
||||
org_name_helper = Great organization names are short and memorable.
|
||||
org_email_helper = Organization's Email receives all notifications and confirmations.
|
||||
create_org = Create Organization
|
||||
repo_updated = Updated
|
||||
people = People
|
||||
invite_someone = Invite Someone
|
||||
teams = Teams
|
||||
lower_members = members
|
||||
lower_repositories = repositories
|
||||
create_new_team = Create New Team
|
||||
org_desc = Description
|
||||
team_name = Team Name
|
||||
team_desc = Description
|
||||
team_name_helper = You'll use this name to mention this team in conversations.
|
||||
team_desc_helper = What is this team all about?
|
||||
team_permission_desc = What permission level should this team have?
|
||||
|
||||
settings = Settings
|
||||
settings.options = Options
|
||||
settings.full_name = Full Name
|
||||
settings.website = Website
|
||||
settings.location = Location
|
||||
settings.update_settings = Update Settings
|
||||
settings.change_orgname = Organization Name Changed
|
||||
settings.change_orgname_desc = Organization name has been changed, do you want to continue? This will affect all links relate to this organization.
|
||||
settings.update_setting_success = Organization setting has been updated successfully.
|
||||
settings.delete = Delete Organization
|
||||
settings.delete_account = Delete This Organization
|
||||
settings.delete_prompt = The operation will delete this organization permanently, and <strong>CANNOT</strong> be undone!
|
||||
settings.confirm_delete_account = Confirm Deletion
|
||||
settings.delete_org_title = Organization Deletion
|
||||
settings.delete_org_desc = This organization is going to be deleted permanently, do you want to continue?
|
||||
settings.hooks_desc = Add webhooks that will be triggered for <strong>all repositories</strong> under this organization.
|
||||
|
||||
members.public = Public
|
||||
members.public_helper = make private
|
||||
members.private = Private
|
||||
members.private_helper = make public
|
||||
members.owner = Owner
|
||||
members.member = Member
|
||||
members.conceal = Conceal
|
||||
members.remove = Remove
|
||||
members.leave = Leave
|
||||
members.invite_desc = Start typing a username to invite a new member to %s:
|
||||
members.invite_now = Invite Now
|
||||
|
||||
teams.join = Join
|
||||
teams.leave = Leave
|
||||
teams.read_access = Read Access
|
||||
teams.read_access_helper = This team will be able to view and clone its repositories.
|
||||
teams.write_access = Write Access
|
||||
teams.write_access_helper = This team will be able to read its repositories, as well as push to them.
|
||||
teams.admin_access = Admin Access
|
||||
teams.admin_access_helper = This team will be able to push/pull to its repositories, as well as add other collaborators to them.
|
||||
teams.no_desc = This team has no description
|
||||
teams.settings = Settings
|
||||
teams.owners_permission_desc = Owners have full access to <strong>all repositories</strong> and have <strong>admin rights</strong> to the organization.
|
||||
teams.members = Team Members
|
||||
teams.update_settings = Update Settings
|
||||
teams.delete_team = Delete This Team
|
||||
teams.add_team_member = Add Team Member
|
||||
teams.delete_team_title = Team Deletion
|
||||
teams.delete_team_desc = This team is going to be deleted, do you want to continue? Members of this team may lose access to some repositories.
|
||||
teams.delete_team_success = Given team has been deleted successfully.
|
||||
teams.read_permission_desc = This team grants <strong>Read</strong> access: members can view and clone the team's repositories.
|
||||
teams.write_permission_desc = This team grants <strong>Write</strong> access: members can read from and push to the team's repositories.
|
||||
teams.admin_permission_desc = This team grants <strong>Admin</strong> access: members can read from, push to, and add collaborators to the team's repositories.
|
||||
teams.repositories = Team Repositories
|
||||
teams.add_team_repository = Add Team Repository
|
||||
teams.remove_repo = Remove
|
||||
teams.add_nonexistent_repo = The repository you're trying to add does not exist, please create it first.
|
||||
|
||||
[admin]
|
||||
dashboard = Dashboard
|
||||
users = Users
|
||||
organizations = Organizations
|
||||
repositories = Repositories
|
||||
authentication = Authentications
|
||||
config = Configuration
|
||||
notices = System Notices
|
||||
monitor = Monitoring
|
||||
prev = Prev.
|
||||
next = Next
|
||||
|
||||
dashboard.statistic = Statistic
|
||||
dashboard.operations = Operations
|
||||
dashboard.system_status = System Monitor Status
|
||||
dashboard.statistic_info = Gogs database has <b>%d</b> users, <b>%d</b> organizations, <b>%d</b> public keys, <b>%d</b> repositories, <b>%d</b> watches, <b>%d</b> stars, <b>%d</b> actions, <b>%d</b> accesses, <b>%d</b> issues, <b>%d</b> comments, <b>%d</b> social accounts, <b>%d</b> follows, <b>%d</b> mirrors, <b>%d</b> releases, <b>%d</b> login sources, <b>%d</b> webhooks, <b>%d</b> milestones, <b>%d</b> labels, <b>%d</b> hook tasks, <b>%d</b> teams, <b>%d</b> update tasks, <b>%d</b> attachments.
|
||||
dashboard.operation_name = Operation Name
|
||||
dashboard.operation_switch = Switch
|
||||
dashboard.operation_run = Run
|
||||
dashboard.clean_unbind_oauth = Clean unbound OAuthes
|
||||
dashboard.clean_unbind_oauth_success = All unbind OAuthes have been deleted successfully.
|
||||
dashboard.delete_inactivate_accounts = Delete all inactive accounts
|
||||
dashboard.delete_inactivate_accounts_success = All inactivate accounts have been deleted successfully.
|
||||
dashboard.delete_repo_archives = Delete all repositories archives
|
||||
dashboard.delete_repo_archives_success = All repositories archives have been deleted successfully.
|
||||
dashboard.git_gc_repos = Do garbage collection on repositories
|
||||
dashboard.git_gc_repos_success = All repositories have done garbage collection successfully.
|
||||
dashboard.server_uptime = Server Uptime
|
||||
dashboard.current_goroutine = Current Goroutines
|
||||
dashboard.current_memory_usage = Current Memory Usage
|
||||
dashboard.total_memory_allocated = Total Memory Allocated
|
||||
dashboard.memory_obtained = Memory Obtained
|
||||
dashboard.pointer_lookup_times = Pointer Lookup Times
|
||||
dashboard.memory_allocate_times = Memory Allocate Times
|
||||
dashboard.memory_free_times = Memory Free Times
|
||||
dashboard.current_heap_usage = Current Heap Usage
|
||||
dashboard.heap_memory_obtained = Heap Memory Obtained
|
||||
dashboard.heap_memory_idle = Heap Memory Idle
|
||||
dashboard.heap_memory_in_use = Heap Memory In Use
|
||||
dashboard.heap_memory_released = Heap Memory Released
|
||||
dashboard.heap_objects = Heap Objects
|
||||
dashboard.bootstrap_stack_usage = Bootstrap Stack Usage
|
||||
dashboard.stack_memory_obtained = Stack Memory Obtained
|
||||
dashboard.mspan_structures_usage = MSpan Structures Usage
|
||||
dashboard.mspan_structures_obtained = MSpan Structures Obtained
|
||||
dashboard.mcache_structures_usage = MCache Structures Usage
|
||||
dashboard.mcache_structures_obtained = MCache Structures Obtained
|
||||
dashboard.profiling_bucket_hash_table_obtained = Profiling Bucket Hash Table Obtained
|
||||
dashboard.gc_metadata_obtained = GC Metadada Obtained
|
||||
dashboard.other_system_allocation_obtained = Other System Allocation Obtained
|
||||
dashboard.next_gc_recycle = Next GC Recycle
|
||||
dashboard.last_gc_time = Since Last GC Time
|
||||
dashboard.total_gc_time = Total GC Pause
|
||||
dashboard.total_gc_pause = Total GC Pause
|
||||
dashboard.last_gc_pause = Last GC Pause
|
||||
dashboard.gc_times = GC Times
|
||||
|
||||
users.user_manage_panel = User Manage Panel
|
||||
users.new_account = Create New Account
|
||||
users.name = Name
|
||||
users.activated = Activated
|
||||
users.admin = Admin
|
||||
users.repos = Repos
|
||||
users.created = Created
|
||||
users.edit = Edit
|
||||
users.auth_source = Authorization Source
|
||||
users.local = Local
|
||||
users.auth_login_name = Authorization Login Name
|
||||
users.update_profile_success = Account profile has been updated successfully.
|
||||
users.edit_account = Edit Account
|
||||
users.is_activated = This account is activated
|
||||
users.is_admin = This account has administrator permissions
|
||||
users.allow_git_hook = This account has permissions to create Git hooks
|
||||
users.update_profile = Update Account Profile
|
||||
users.delete_account = Delete This Account
|
||||
users.still_own_repo = This account still have ownership of repository, you have to delete or transfer them first.
|
||||
users.still_has_org = This account still have membership of organization, you have to left or delete them first.
|
||||
|
||||
orgs.org_manage_panel = Organization Manage Panel
|
||||
orgs.name = Name
|
||||
orgs.teams = Teams
|
||||
orgs.members = Members
|
||||
|
||||
repos.repo_manage_panel = Repository Manage Panel
|
||||
repos.owner = Owner
|
||||
repos.name = Name
|
||||
repos.private = Private
|
||||
repos.watches = Watches
|
||||
repos.stars = Stars
|
||||
repos.issues = Issues
|
||||
|
||||
auths.auth_manage_panel = Authorization Manage Panel
|
||||
auths.new = Add New Authorization Source
|
||||
auths.name = Name
|
||||
auths.type = Type
|
||||
auths.enabled = Enabled
|
||||
auths.updated = Updated
|
||||
auths.auth_type = Authorization Type
|
||||
auths.auth_name = Authorization Name
|
||||
auths.domain = Domain
|
||||
auths.host = Host
|
||||
auths.port = Port
|
||||
auths.base_dn = Base DN
|
||||
auths.attributes = Search Attributes
|
||||
auths.filter = Search Filter
|
||||
auths.ms_ad_sa = Ms Ad SA
|
||||
auths.smtp_auth = SMTP Authorization Type
|
||||
auths.smtphost = SMTP Host
|
||||
auths.smtpport = SMTP Port
|
||||
auths.enable_tls = Enable TLS Encryption
|
||||
auths.enable_auto_register = Enable Auto Registration
|
||||
auths.tips = Tips
|
||||
auths.edit = Edit Authorization Setting
|
||||
auths.activated = This authentication has activated
|
||||
auths.update_success = Authorization setting has been updated successfully.
|
||||
auths.update = Update Authorization Setting
|
||||
auths.delete = Delete This Authorization
|
||||
auths.delete_auth_title = Authorization Deletion
|
||||
auths.delete_auth_desc = This authorization is going to be deleted, do you want to continue?
|
||||
|
||||
config.server_config = Server Configuration
|
||||
config.app_name = Application Name
|
||||
config.app_ver = Application Version
|
||||
config.app_url = Application URL
|
||||
config.domain = Domain
|
||||
config.offline_mode = Offline Mode
|
||||
config.disable_router_log = Disable Router Log
|
||||
config.run_user = Run User
|
||||
config.run_mode = Run Mode
|
||||
config.repo_root_path = Repository Root Path
|
||||
config.static_file_root_path = Static File Root Path
|
||||
config.log_file_root_path = Log File Root Path
|
||||
config.script_type = Script Type
|
||||
config.reverse_auth_user = Reverse Authentication User
|
||||
config.db_config = Database Configuration
|
||||
config.db_type = Type
|
||||
config.db_host = Host
|
||||
config.db_name = Name
|
||||
config.db_user = User
|
||||
config.db_ssl_mode = SSL Mode
|
||||
config.db_ssl_mode_helper = (for "postgres" only)
|
||||
config.db_path = Path
|
||||
config.db_path_helper = (for "sqlite3" only)
|
||||
config.service_config = Service Configuration
|
||||
config.register_email_confirm = Register Email Confirmation
|
||||
config.disable_register = Disable Registration
|
||||
config.require_sign_in_view = Require Sign In View
|
||||
config.mail_notify = Mail Notification
|
||||
config.enable_cache_avatar = Enable Cache Avatar
|
||||
config.active_code_lives = Active Code Lives
|
||||
config.reset_password_code_lives = Reset Password Code Lives
|
||||
config.webhook_config = Webhook Configuration
|
||||
config.task_interval = Task Interval
|
||||
config.deliver_timeout = Deliver Timeout
|
||||
config.mailer_config = Mailer Configuration
|
||||
config.mailer_enabled = Enabled
|
||||
config.mailer_name = Name
|
||||
config.mailer_host = Host
|
||||
config.mailer_user = User
|
||||
config.oauth_config = OAuth Configuration
|
||||
config.oauth_enabled = Enabled
|
||||
config.cache_config = Cache Configuration
|
||||
config.cache_adapter = Cache Adapter
|
||||
config.cache_interval = Cache Interval
|
||||
config.cache_conn = Cache Connection
|
||||
config.session_config = Session Configuration
|
||||
config.session_provider = Session Provider
|
||||
config.provider_config = Provider Config
|
||||
config.cookie_name = Cookie Name
|
||||
config.enable_set_cookie = Enable Set Cookie
|
||||
config.gc_interval_time = GC Interval Time
|
||||
config.session_life_time = Session Life Time
|
||||
config.https_only = HTTPS Only
|
||||
config.cookie_life_time = Cookie Life Time
|
||||
config.picture_config = Picture Configuration
|
||||
config.picture_service = Picture Service
|
||||
config.disable_gravatar = Disable Gravatar
|
||||
config.log_config = Log Configuration
|
||||
config.log_mode = Log Mode
|
||||
|
||||
monitor.cron = Cron Tasks
|
||||
monitor.name = Name
|
||||
monitor.schedule = Schedule
|
||||
monitor.next = Next Time
|
||||
monitor.previous = Previous Time
|
||||
monitor.execute_times = Execute Times
|
||||
monitor.process = Running Processes
|
||||
monitor.desc = Description
|
||||
monitor.start = Start Time
|
||||
monitor.execute_time = Execution Time
|
||||
|
||||
notices.system_notice_list = System Notices
|
||||
notices.type = Type
|
||||
notices.type_1 = Repository
|
||||
notices.desc = Description
|
||||
notices.op = Op.
|
||||
notices.delete_success = System notice has been deleted successfully.
|
||||
|
||||
[action]
|
||||
create_repo = created repository <a href="%s/%s">%s</a>
|
||||
commit_repo = pushed to <a href="%s/%s/src/%s">%s</a> at <a href="%s/%s">%s</a>
|
||||
create_issue = opened issue <a href="%s/%s/issues/%s">%s#%s</a>
|
||||
comment_issue = commented on issue <a href="%s/%s/issues/%s">%s#%s</a>
|
||||
transfer_repo = transfered repository <code>%s</code> to <a href="/%s%s">%s</a>
|
||||
push_tag = pushed tag <a href="%s/%s/src/%s">%s</a> to <a href="%s/%s">%s</a>
|
||||
compare_2_commits = View comparison for these 2 commits
|
||||
|
||||
[tool]
|
||||
ago = ago
|
||||
from_now = from now
|
||||
now = now
|
||||
1s = 1 second %s
|
||||
1m = 1 minute %s
|
||||
1h = 1 hour %s
|
||||
1d = 1 day %s
|
||||
1w = 1 week %s
|
||||
1mon = 1 month %s
|
||||
1y = 1 year %s
|
||||
seconds = %d seconds %s
|
||||
minutes = %d minutes %s
|
||||
hours = %d hours %s
|
||||
days = %d days %s
|
||||
weeks = %d weeks %s
|
||||
months = %d months %s
|
||||
years = %d years %s
|
||||
raw_seconds = seconds
|
||||
raw_minutes = minutes
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
718
conf/locale/locale_fr-CA.ini
Executable file
718
conf/locale/locale_fr-CA.ini
Executable file
@@ -0,0 +1,718 @@
|
||||
app_desc=Un service de Git sans prise de tête auto-hébergé codé en Go
|
||||
|
||||
home=Accueil
|
||||
dashboard=Tableau de bord
|
||||
explore=Explorer
|
||||
help=Aide
|
||||
sign_in=Connexion
|
||||
social_sign_in=Connexion avec un réseau social : 2e étape <small>associer un compte</small>
|
||||
sign_out=Déconnexion
|
||||
sign_up=Créer un compte
|
||||
register=S'enregistrer
|
||||
website=Site Web
|
||||
version=Version
|
||||
page=Page
|
||||
template=Modèle
|
||||
language=Langue
|
||||
|
||||
username=Nom d'utilisateur
|
||||
email=E-mail
|
||||
password=Mot de passe
|
||||
re_type=Confirmez
|
||||
captcha=Captcha
|
||||
|
||||
repository=Référentiel
|
||||
organization=Organisation
|
||||
mirror=Miroir
|
||||
new_repo=Nouveau Référentiel
|
||||
new_migrate=Nouvelle Migration
|
||||
new_fork=Nouveau référentiel de fourche
|
||||
new_org=Nouvelle Organisation
|
||||
manage_org=Gérer les Organisations
|
||||
admin_panel=Administration
|
||||
account_settings=Paramètres du Compte
|
||||
settings=Paramètres
|
||||
|
||||
news_feed=Flux d'actualités
|
||||
pull_requests=Extraire les Requêtes
|
||||
issues=Problèmes
|
||||
|
||||
cancel=Annuler
|
||||
|
||||
[install]
|
||||
install=Installation
|
||||
title=Instructions de Première Installation
|
||||
requite_db_desc=Gogs nécessite MySQL, PostgreSQL ou SQLite3.
|
||||
db_type=Type de Base de Données
|
||||
host=Hôte
|
||||
user=Utilisateur
|
||||
password=Mot De Passe
|
||||
db_name=Nom de la Base de Données
|
||||
db_helper=Veuillez utiliser le moteur INNODB avec le jeu de caractères utf8_general_ci pour MySQL.
|
||||
ssl_mode=Mode SSL
|
||||
path=Chemin
|
||||
sqlite_helper=Emplacement du fichier de la base de données SQLite3.
|
||||
general_title=Paramètres Généraux de Gogs
|
||||
repo_path=Emplacement Racine du Référentiel
|
||||
repo_path_helper=Tous les Référentiels Git distants seront sauvegardés ici.
|
||||
run_user=Entrer un Utilisateur
|
||||
run_user_helper=L'utilisateur doit avoir accès à la Racine du Référentiel et éxécuter Gogs.
|
||||
domain=Domaine
|
||||
domain_helper=Cela affecte les doublons d'URL SSH.
|
||||
app_url=URL de l'Application
|
||||
app_url_helper=Cela affecte les doublons d'URL HTTP/HTTPS et le contenu d'e-mail.
|
||||
email_title=Paramètres du Service de Messagerie (Facultatif)
|
||||
smtp_host=Hôte SMTP
|
||||
mailer_user=E-mail de l'Expéditeur
|
||||
mailer_password=Mot de Passe de l'Expéditeur
|
||||
notify_title=Paramètre des Notifications (Facultatif)
|
||||
register_confirm=Activer la Confirmation d'Enregistrement
|
||||
mail_notify=Activer la Notification des Mails reçus
|
||||
admin_title=Paramètres du Compte Administrateur
|
||||
admin_name=Nom d'Utilisateur
|
||||
admin_password=Mot de Passe
|
||||
confirm_password=Confirmez le Mot de Passe
|
||||
admin_email=E-mail
|
||||
install_gogs=Installer Gogs
|
||||
test_git_failed=Tentative de commande "git" échouée : %v
|
||||
sqlite3_not_available=Votre version publiée ne prend pas en charge SQLite3. Veuillez télécharger la version binaire officielle à cette adresse %s.
|
||||
invalid_db_setting=Paramètres de base de données incorrects : %v
|
||||
invalid_repo_path=Chemin Racine du Référentiel invalide : %v
|
||||
run_user_not_match=L'utilisateur entré n'est pas l'utilisateur actuel : %s -> %s
|
||||
save_config_failed=Sauvegarde de la configuration échouée : %v
|
||||
invalid_admin_setting=Paramètres du compte administrateur invalides : %v
|
||||
install_success=Bienvenue ! Nous sommes heureux que vous ayez choisi Gogs, amusez-vous et prenez soin de vous.
|
||||
|
||||
[home]
|
||||
uname_holder=Nom d'Utilisateur ou E-mail
|
||||
password_holder=Mot de Passe
|
||||
switch_dashboard_context=Basculer le Contexte du Tableau de Bord
|
||||
my_repos=Mes Référentiels
|
||||
collaborative_repos=Référentiels collaboratifs
|
||||
my_orgs=Mes Organisations
|
||||
my_mirrors=Mes Miroirs
|
||||
|
||||
[explore]
|
||||
repos=Référentiels
|
||||
|
||||
[auth]
|
||||
create_new_account=Créer un Nouveau Compte
|
||||
register_hepler_msg=Déjà enregistré ? Connectez-vous !
|
||||
social_register_hepler_msg=Possesseur d'un compte ? Associez-le !
|
||||
disable_register_prompt=Désolé, les enregistrements ont été désactivés. Veuillez contacter l'administrateur du site.
|
||||
disable_register_mail=Désolé, la Confirmation par Mail des Enregistrements a été désactivée.
|
||||
remember_me=Se souvenir de Moi
|
||||
forgot_password=Mot de Passe oublié
|
||||
forget_password=Mot de Passe oublié ?
|
||||
sign_up_now=Pas de compte ? Créer maintenant.
|
||||
confirmation_mail_sent_prompt=Un nouveau mail de confirmation à été envoyé à <b>%s</b>. Veuillez vérifier votre boîte de réception dans un délai de %d heures pour compléter votre enregistrement.
|
||||
sign_in_email=Connexion avec l'E-mail
|
||||
active_your_account=Activer votre Compte
|
||||
resent_limit_prompt=Désolé, vos tentatives d'activation sont trop fréquentes. Veuillez réessayer dans 3 minutes.
|
||||
has_unconfirmed_mail=Bonjour %s, votre adresse e-mail n'a pas été confirmée (<b>%s</b>). Si vous n'avez reçu aucun mail de confirmation ou souhaitez renouveler l'envoi, appuyez sur le bouton ci-dessous.
|
||||
resend_mail=Appuyez ici pour renvoyer un mail de confirmation
|
||||
email_not_associate=Cette adresse e-mail n'est associée à aucun compte.
|
||||
send_reset_mail=Appuyez ici pour (r)envoyer le mail de réinitialisation du mot de passe
|
||||
reset_password=Réinitialiser le Mot de Passe
|
||||
invalid_code=Désolé, code de confirmation invalide ou expiré.
|
||||
reset_password_helper=Appuyez ici pour réinitialiser votre mot de passe
|
||||
password_too_short=Le mot de passe doit contenir 6 caractères minimum.
|
||||
|
||||
[form]
|
||||
UserName=Nom d'Utilisateur
|
||||
RepoName=Nom du Référentiel
|
||||
Email=Adresse E-mail
|
||||
Password=Mot de Passe
|
||||
Retype=Confirmez le Mot de Passe
|
||||
SSHTitle=Nom de la clé SSH
|
||||
HttpsUrl=URL HTTPS
|
||||
PayloadUrl=URL des Données Utiles
|
||||
TeamName=Nom d'équipe
|
||||
AuthName=Nom d'autorisation
|
||||
AdminEmail=E-mail d'admin
|
||||
|
||||
require_error=` Ne peut être vide `
|
||||
alpha_dash_error=` doivent être des caractères alpha, numeriques ou console (-_) valides `
|
||||
alpha_dash_dot_error=` doivent être des caractères alpha, numeriques, console (-_) valides ou des points `
|
||||
min_size_error=` %s caractères minimum `
|
||||
max_size_error=` %s caractères maximum `
|
||||
email_error=` adresse e-mail invalide `
|
||||
url_error=` URL invalide `
|
||||
unknown_error=Erreur inconnue :
|
||||
captcha_incorrect=Le Captcha ne correspond pas.
|
||||
password_not_match=Le mot de passe et la confirmation de mot de passe ne correspondent pas.
|
||||
|
||||
username_been_taken=Nom d'utilisateur déjà pris.
|
||||
repo_name_been_taken=Nom de Référentiel déjà pris.
|
||||
org_name_been_taken=Nom d'organisation déjà pris.
|
||||
team_name_been_taken=Nom d'équipe déjà pris.
|
||||
email_been_used=Adresse e-mail déjà utilisée.
|
||||
ssh_key_been_used=Le nom de la clé publique a déjà servi.
|
||||
illegal_username=Le nom d'utilisateur contient des caractères interdits.
|
||||
illegal_repo_name=Le nom du Référentiel contient des caractères interdits.
|
||||
illegal_org_name=Le nom de l'organisation contient des caractères interdits.
|
||||
illegal_team_name=Le nom de l'équipe contient des caractères interdits.
|
||||
username_password_incorrect=Nom d'utilisateur ou mot de passe incorrect.
|
||||
enterred_invalid_repo_name=Veuillez vérifier que le nom saisi du Référentiel soit correct.
|
||||
enterred_invalid_owner_name=Veuillez vérifier que le nom du propriétaire saisi soit correct.
|
||||
enterred_invalid_password=Veuillez vérifier que le mot de passe saisi soit correct.
|
||||
user_not_exist=Cet utilisateur n'existe pas.
|
||||
last_org_owner=L'utilisateur à exclure est le dernier membre de l'équipe propriétaire. Il doit y avoir un autre propriétaire.
|
||||
|
||||
invalid_ssh_key=Désolé, impossible de valider votre clé SSH : %s
|
||||
unable_verify_ssh_key=Gogs n'a pu vérifier la validité de votre clé SSH, même si nous partons du principe qu'elle le soit. Cela-dit, veuillez vous en assurer.
|
||||
auth_failed=Échec d'authentification : %s
|
||||
|
||||
still_own_repo=Votre compte comporte toujours des propriétés de Référentiel. Vous devez d'abord les supprimer ou les transférer.
|
||||
still_has_org=Votre compte a toujours membres de l'organisation, vous avez à gauche ou supprimez tout d'abord.
|
||||
org_still_own_repo=Cette organisation comporte toujours des propriétés de Référentiel. Vous devez d'abord les supprimer ou les transférer.
|
||||
|
||||
still_own_user=Cette authentification a déjà servi à d'autres utilisateurs. Veuillez les déplacer puis supprimez à nouveau.
|
||||
|
||||
target_branch_not_exist=Branche cible n'existe pas
|
||||
|
||||
[user]
|
||||
change_avatar=Changez d'avatar via gravatar.com
|
||||
change_custom_avatar=Changer de vignette dans les réglages
|
||||
join_on=Adhéré le
|
||||
repositories=Référentiels
|
||||
activity=Activités publiques
|
||||
followers=Abonnés
|
||||
starred=Votés
|
||||
following=Abonnements
|
||||
|
||||
[settings]
|
||||
profile=Profil
|
||||
password=Mot de Passe
|
||||
ssh_keys=Clés SSH
|
||||
social=Réseaux Sociaux
|
||||
applications=Applications
|
||||
orgs=Organisations
|
||||
delete=Supprimer le Compte
|
||||
uid=ID d'Utilisateur
|
||||
|
||||
public_profile=Profil Public
|
||||
profile_desc=Votre adresse e-mail est publique et sera utilisée pour les notifications relatives au compte, ainsi que pour toute opération Web effectuée via le site.
|
||||
full_name=Non Complet
|
||||
website=Site Web
|
||||
location=Localisation
|
||||
update_profile=Valider les modifications
|
||||
update_profile_success=Profil mis à jour avec succès.
|
||||
change_username=Non d'utilisateur modifié
|
||||
change_username_desc=Nom d'utilisateur modifié. Cela affecte tous les liens relatifs à votre compte. Continuer ?
|
||||
continue=Continuer
|
||||
cancel=Annuler
|
||||
|
||||
enable_custom_avatar=Permettre vignette personnalisée
|
||||
enable_custom_avatar_helper=Cette option désactive l'affichage via Gravatar
|
||||
choose_new_avatar=Choisir nouvelle vignette
|
||||
update_avatar=Réglage de mise à jour de vignette
|
||||
uploaded_avatar_not_a_image=Le fichier téléchargé n'est pas une image.
|
||||
no_custom_avatar_available=Aucun avatar personnalisé disponible, activation impossible.
|
||||
update_avatar_success=La mise à jour de votre vignette a réussi.
|
||||
|
||||
change_password=Modifier le Mot de Passe
|
||||
old_password=Mot de Passe actuel
|
||||
new_password=Nouveau Mot de Passe
|
||||
password_incorrect=Mot de passe actuel incorrect.
|
||||
change_password_success=Mot de passe modifié avec succès. Vous pouvez à présent vous connecter avec le nouveau mot de passe.
|
||||
|
||||
manage_ssh_keys=Gérer les clés SSH
|
||||
add_key=Ajouter une Clé
|
||||
ssh_desc=Ceci est une liste des clés SSH associées à votre compte. Supprimez celles que vous ne reconnaissez pas.
|
||||
ssh_helper=<strong>Besoin d'aide?</strong> Consultez notre guide pour <a href="%s"> générer des clés SSH</a> ou résoudre les <a href="%s"> problèmes courants de SSH</a>.
|
||||
add_new_key=Ajouter une Clé SSH
|
||||
key_name=Nom de la Clé
|
||||
key_content=Contenu
|
||||
add_key_success=Nouvelle Clé SSH ajoutée !
|
||||
delete_key=Supprimer
|
||||
add_on=Ajouté le
|
||||
last_used=Dernière utilisation le
|
||||
no_activity=Aucune activité récente
|
||||
|
||||
manage_social=Gérer les réseaux sociaux associés
|
||||
social_desc=Ceci est la liste des comptes de réseaux sociaux associés. Supprimez ceux que vous ne reconnaissez pas.
|
||||
unbind=Dissocier
|
||||
unbind_success=Compte de réseau social dissocié.
|
||||
|
||||
manage_access_token=Gérer les jetons d'accès personnels
|
||||
generate_new_token=Générer le nouveau jeton
|
||||
tokens_desc=Jetons, que vous avez généré qui peuvent être utilisés pour accéder à l'API Gogs.
|
||||
new_token_desc=Comme pour l'instant, chaque jeton aura un accès complet à votre compte.
|
||||
token_name=Nom du jeton
|
||||
generate_token=Générer le jeton
|
||||
generate_token_succees=Nouveau jeton d'accès a été généré avec succès ! Assurez-vous de copier votre nouveau jeton d'accès personnel maintenant. Vous ne serez pas en mesure de le revoir !
|
||||
delete_token=Supprimer
|
||||
delete_token_success=Jeton d'accès personnelle a été supprimée avec succès ! N'oubliez pas de mettre à jour vos applications aussi bien.
|
||||
|
||||
delete_account=Supprimer le Compte
|
||||
delete_prompt=Votre compte sera supprimé définitivement et cette opération est <strong>IRRÉVERSIBLE</strong> !
|
||||
confirm_delete_account=Confirmer la suppression
|
||||
delete_account_title=Suppression de compte
|
||||
delete_account_desc=Ce compte sera supprimé définitivement. Voulez-vous continuer ?
|
||||
|
||||
[repo]
|
||||
owner=Propriétaire
|
||||
repo_name=Nom du Référentiel
|
||||
repo_name_helper=Idéalement, le nom d'un Référentiel devrait être court, mémorable et <strong>unique</strong>.
|
||||
visibility=Visibilité
|
||||
visiblity_helper=Ce Référentiel est <span class="label label-red label-radius">Privé</span>
|
||||
fork_repo=Référentiel de la fourche
|
||||
fork_from=Fourche de
|
||||
fork_visiblity_helper=Référentiel Aristide ne peut pas changer sa visiblité
|
||||
repo_desc=Description
|
||||
repo_lang=Langue
|
||||
repo_lang_helper=Sélectionner un fichier .gitignore
|
||||
license=Licence
|
||||
license_helper=Sélectionner un fichier de licence
|
||||
init_readme=Initialiser ce Référentiel avec un README.md
|
||||
create_repo=Créer un Référentiel
|
||||
default_branch=Branche par défaut
|
||||
mirror_interval=Intervalle du miroir (heure)
|
||||
goget_meta=Méta Go-Get
|
||||
goget_meta_helper=Ce Référentiel sera <span class="label label-blue label-radius">Go-Getable</span>
|
||||
|
||||
need_auth=Nécessite une Autorisation
|
||||
migrate_type=Type de Migration
|
||||
migrate_type_helper=Ce Référentiel sera un <span class="label label-blue label-radius">Miroir</span>
|
||||
migrate_repo=Migrer le Référentiel
|
||||
|
||||
copy_link=Copier
|
||||
click_to_copy=Copier dans le presse-papier
|
||||
copied=Copié
|
||||
clone_helper=Besoin d'aide pour le clonage ? Visitez <a target="_blank" href="%s"> l'aider</a> !
|
||||
unwatch=Ne plus suivre
|
||||
watch=Suivre
|
||||
unstar=Retirer le vote
|
||||
star=Voter
|
||||
fork=Embranchement
|
||||
|
||||
no_desc=Aucune description
|
||||
quick_guide=Introduction rapide
|
||||
clone_this_repo=Dupliquer ce Référentiel
|
||||
create_new_repo_command=Créer un nouveau Référentiel en ligne de commande
|
||||
push_exist_repo=Soumettre un Référentiel existant par ligne de commande
|
||||
|
||||
branch=Branche
|
||||
tree=Aborescence
|
||||
branch_and_tags=Branches & Tags
|
||||
branches=Branches
|
||||
tags=Tags
|
||||
issues=Problèmes
|
||||
commits=Commissions
|
||||
releases=Publications
|
||||
file_raw=Raw
|
||||
file_history=Historique
|
||||
file_view_raw=Voir le Raw
|
||||
|
||||
commits.commits=Commissions
|
||||
commits.search=Rechercher des commissions
|
||||
commits.find=Trouver
|
||||
commits.author=Auteur
|
||||
commits.message=Message
|
||||
commits.date=Date
|
||||
commits.older=Précédemment
|
||||
commits.newer=Récemment
|
||||
|
||||
settings=Paramètres
|
||||
settings.options=Options
|
||||
settings.collaboration=Collaboration
|
||||
settings.hooks=Webhooks
|
||||
settings.githooks=Git Hooks
|
||||
settings.deploy_keys=Clés de déploiement
|
||||
settings.basic_settings=Paramètres de base
|
||||
settings.danger_zone=Zone de danger
|
||||
settings.site=Site officiel
|
||||
settings.update_settings=Valider
|
||||
settings.change_reponame=Référentiel renommé
|
||||
settings.change_reponame_desc=Le Référentiel a été renommé. Cela affecte tous les liens relatifs à ce Référentiel. Continuer ?
|
||||
settings.transfer=Transférer les propriétés
|
||||
settings.transfer_desc=Transfère ce Référentiel à un autre utilisateur ou organisation dont vous possédez des droits d'administrateur.
|
||||
settings.new_owner_has_same_repo=Le nouveau propriétaire a déjà un Référentiel nommé ainsi.
|
||||
settings.delete=Supprimer ce Référentiel
|
||||
settings.delete_desc=Attention, action irréversible. Soyez sûre de vous.
|
||||
settings.transfer_notices=<p>- Vous perdrez l'accès si le nouveau propriétaire est un utilisateur individuel.</p><p>- Vous garderez l'accès si le nouveau propriétaire est une organisation et que vous en faites partie.</p>
|
||||
settings.update_settings_success=Options mises à jour avec succès.
|
||||
settings.transfer_owner=Nouveau propriétaire
|
||||
settings.make_transfer=Transférer
|
||||
settings.transfer_succeed=Propriétés transférées avec succès.
|
||||
settings.confirm_delete=Confirmer la suppression
|
||||
settings.add_collaborator=Ajouter un collaborateur
|
||||
settings.add_collaborator_success=Nouveau collaborateur ajouté.
|
||||
settings.remove_collaborator_success=Collaborateur supprimé.
|
||||
settings.user_is_org_member=Cet utilisateur ne peut pas être ajouté en tant que collaborateur car il fait partie d'une organisation.
|
||||
settings.add_webhook=Ajouter un Webhook
|
||||
settings.hooks_desc=Webhooks aux services externes être notifié lorsque certains événements se produisent sur Gogs. Lorsque les événements spécifiés se produisent, nous vous enverrons une demande POST à chacun des URL que vous fournissez. Apprenez-en davantage dans notre <a target="_blank" href="%s"> Webhooks Guide</a>.
|
||||
settings.githooks_desc=Les Hooks Git sont alimentés par Git lui même. Les Hooks compatibles sont modifiables dans la liste ci-dessous pour effectuer des opérations personnalisées.
|
||||
settings.githook_edit_desc=Si un Hook est inactif, un exemple de contenu vous sera proposé. Un contenu laissé vide signifie un Hook inactif.
|
||||
settings.githook_name=Nom du Hook
|
||||
settings.githook_content=Contenu du Hook
|
||||
settings.update_githook=Mettre le Hook à jour
|
||||
settings.remove_hook_success=Webhook supprimé.
|
||||
settings.add_webhook_desc=Nous vous enverrons une demande <code>POST</code> à l'URL ci-dessous avec les détails de tous les événements souscrites. Vous pouvez également spécifier quel format de données vous souhaitez recevoir (JSON, <code>x-www-formulaires-urlencoded</code>, <em>etc.</em>). Plus d'informations se trouvent dans le <a target="_blank" href="%s"> Guide de le Webhooks</a>.
|
||||
settings.payload_url=URL des Données Utiles
|
||||
settings.content_type=Type de contenu
|
||||
settings.secret=Confidentiel
|
||||
settings.event_desc=Quel évènement ce Webhook doit-il déclencher ?
|
||||
settings.event_push_only=Uniquement les <code>push</code> (soumissions).
|
||||
settings.active=Actif
|
||||
settings.active_helper=Les détails seront délivrés lorsque ce Hook sera déclenché.
|
||||
settings.add_hook_success=Nouveau Webhook ajouté.
|
||||
settings.update_webhook=Mettre le Webhook à jour
|
||||
settings.update_hook_success=Webhook mis à jour.
|
||||
settings.delete_webhook=Supprimer le Webhook
|
||||
settings.recent_deliveries=Livraisons récentes
|
||||
settings.hook_type=Type de Hook
|
||||
settings.add_slack_hook_desc=Ajouter <a href="%s"> Slack</a> intégration dans votre référentiel.
|
||||
settings.slack_token=Jeton
|
||||
settings.slack_domain=Domaine
|
||||
settings.slack_channel=Canal
|
||||
|
||||
diff.browse_source=Parcourir la Source
|
||||
diff.parent=Parent
|
||||
diff.commit=Commettre
|
||||
diff.data_not_available=Données Diff indisponibles.
|
||||
diff.show_diff_stats=Afficher les stats Diff
|
||||
diff.stats_desc=<strong> %d fichiers modifiés</strong> avec <strong>%d ajouts</strong> et <strong>%d suppressions</strong>
|
||||
diff.bin=BIN
|
||||
diff.view_file=Voir le fichier
|
||||
|
||||
release.releases=Releases
|
||||
release.new_release=New Release
|
||||
release.draft=Draft
|
||||
release.prerelease=Pre-Release
|
||||
release.stable=Stable
|
||||
release.edit=edit
|
||||
release.ahead=<strong>%d</strong> commits to %s since this release
|
||||
release.source_code=Source Code
|
||||
release.tag_name=Tag name
|
||||
release.target=Target
|
||||
release.tag_helper=Choose an existing tag, or create a new tag on publish.
|
||||
release.release_title=Release title
|
||||
release.content_with_md=Content with <a href="%s">Markdown</a>
|
||||
release.write=Write
|
||||
release.preview=Preview
|
||||
release.content_placeholder=Write some content
|
||||
release.loading=Loading...
|
||||
release.prerelease_desc=This is a pre-release
|
||||
release.prerelease_helper=We’ll point out that this release is identified as non-production ready.
|
||||
release.publish=Publish Release
|
||||
release.save_draft=Save Draft
|
||||
release.edit_release=Edit Release
|
||||
release.tag_name_already_exist=Release with this tag name has already existed.
|
||||
|
||||
[org]
|
||||
org_name_holder=Nom d'organisation
|
||||
org_name_helper=Idéalement, un nom d'organisation devrait être court et mémorable.
|
||||
org_email_helper=L'e-mail de l'organisation recevra toutes les notifications et confirmations.
|
||||
create_org=Créer une organisation
|
||||
repo_updated=Mis à jour
|
||||
people=Contacts
|
||||
invite_someone=Inviter quelqu'un
|
||||
teams=Équipes
|
||||
lower_members=Membres
|
||||
lower_repositories=Référentiels
|
||||
create_new_team=Créer une Nouvelle Équipe
|
||||
org_desc=Description
|
||||
team_name=Nom d'Équipe
|
||||
team_desc=Description
|
||||
team_name_helper=Ce nom sera utilisé pour mentionner l'équipe dans les conversations.
|
||||
team_desc_helper=Présentation de l'équipe
|
||||
team_permission_desc=Quel niveau d'accès cette équipe devrait-elle posséder ?
|
||||
|
||||
settings=Paramètres
|
||||
settings.options=Options
|
||||
settings.full_name=Non Complet
|
||||
settings.website=Site Web
|
||||
settings.location=Localisation
|
||||
settings.update_settings=Valider
|
||||
settings.change_orgname=Organisation renommée
|
||||
settings.change_orgname_desc=L'Organisation a été renommée. Cela affecte tous les liens relatifs à cette organisation. Continuer ?
|
||||
settings.update_setting_success=Paramètres d'organisation modifiés avec succès.
|
||||
settings.delete=Supprimer l'organisation
|
||||
settings.delete_account=Supprimer cette organisation
|
||||
settings.delete_prompt=Cela supprimera cette organisation définitivement. Cette opération est <strong>IRRÉVERSIBLE</strong> !
|
||||
settings.confirm_delete_account=Confirmez la suppression
|
||||
settings.delete_org_title=Suppression d'organisation
|
||||
settings.delete_org_desc=Cette organisation sera définitivement supprimée. Continuer ?
|
||||
settings.hooks_desc=Ajoute des Webhooks qui seront activés pour <strong>tous les Référentiels</strong> de cette organisation.
|
||||
|
||||
members.public=Public
|
||||
members.public_helper=Rendre privé
|
||||
members.private=Privé
|
||||
members.private_helper=Rendre public
|
||||
members.owner=Propriétaire
|
||||
members.member=Membre
|
||||
members.conceal=Masquer
|
||||
members.remove=Exclure
|
||||
members.leave=Quitter
|
||||
members.invite_desc=Tapez un nom d'utilisateur pour inviter un nouveau membre chez %s :
|
||||
members.invite_now=Lancer l'invitation
|
||||
|
||||
teams.join=Rejoindre
|
||||
teams.leave=Quitter
|
||||
teams.read_access=Accès en Lecture
|
||||
teams.read_access_helper=Cette équipe aura la possibilité de voir et dupliquer ses Référentiels.
|
||||
teams.write_access=Accès en Écriture
|
||||
teams.write_access_helper=Cette équipe possèdera aussi bien des droits de lecture que d'écriture sur ses Référentiels.
|
||||
teams.admin_access=Accès Administrateur
|
||||
teams.admin_access_helper=Cette équipe possèdera des droits de lecture, d'écriture, ainsi que le pouvoir d'ajouter des collaborateurs.
|
||||
teams.no_desc=Aucune description
|
||||
teams.settings=Paramètres
|
||||
teams.owners_permission_desc=Les propriétaires possèdent <strong>les droits d'administrateur</strong> et disposent d'un accès complet à <strong>tous les Référentiels</strong> de l'organisation.
|
||||
teams.members=Membres de L'Équipe
|
||||
teams.update_settings=Valider
|
||||
teams.delete_team=Supprimer cette Équipe
|
||||
teams.add_team_member=Ajouter un Membre
|
||||
teams.delete_team_title=Suppression de l'équipe
|
||||
teams.delete_team_desc=Cette équipe sera supprimée. Les membres pourraient perdre leurs accès à certains Référentiels.
|
||||
teams.delete_team_success=Équipe supprimée avec succès.
|
||||
teams.read_permission_desc=Cette équipe permet l'accès en <strong>lecture</strong> : les membres peuvent voir et dupliquer ses Référentiels.
|
||||
teams.write_permission_desc=Cette équipe permet l'accès en <strong>écriture</strong> : les membres peuvent participer à ses Référentiels.
|
||||
teams.admin_permission_desc=Cette équipe permet l'accès en <strong>administrateur</strong> : les membres peuvent voir, participer et ajouter des collaborateurs à ses Référentiels.
|
||||
teams.repositories=Référentiels de l'Équipe
|
||||
teams.add_team_repository=Ajouter un Référentiel à l'Équipe
|
||||
teams.remove_repo=Supprimer
|
||||
teams.add_nonexistent_repo=Référentiel inexistant, veuillez d'abord le créer.
|
||||
|
||||
[admin]
|
||||
dashboard=Tableau de bord
|
||||
users=Utilisateurs
|
||||
organizations=Organisations
|
||||
repositories=Référentiels
|
||||
authentication=Authentifications
|
||||
config=Configuration
|
||||
notices=Notes Systèmes
|
||||
monitor=Supervision
|
||||
prev=Préc.
|
||||
next=Suiv.
|
||||
|
||||
dashboard.statistic=Statistiques
|
||||
dashboard.operations=Opérations
|
||||
dashboard.system_status=État du Moniteur Système
|
||||
dashboard.statistic_info=La base de données Gogs contient <b>%d</b> utilisateurs, <b>%d</b> organisations, <b>%d</b> clés publiques, <b>%d</b> Référentiels, <b>%d</b> suivis, <b>%d</b> votes, <b>%d</b> actions, <b>%d</b> accès, <b>%d</b> problèmes, <b>%d</b> commentaires, <b>%d</b> comptes de réseaux sociaux, <b>%d</b> abonnements, <b>%d</b> miroirs, <b>%d</b> publications, <b>%d</b> connexions d'origine, <b>%d</b> webhooks, <b>%d</b> milestones, <b>%d</b> labels, <b>%d</b> tâches hook, <b>%d</b> équipes, <b>%d</b> tâches de mise à jour, <b>%d</b> fichiers.
|
||||
dashboard.operation_name=Nom de l'Opération
|
||||
dashboard.operation_switch=Basculer
|
||||
dashboard.operation_run=Exécuter
|
||||
dashboard.clean_unbind_oauth=Nettoyer les associations OAuthes
|
||||
dashboard.clean_unbind_oauth_success=Tous unbind OAuthes ont été supprimés avec succès.
|
||||
dashboard.delete_inactivate_accounts=Supprimer tous les comptes inactifs
|
||||
dashboard.delete_inactivate_accounts_success=Inactivent tous les comptes ont été supprimés avec succès.
|
||||
dashboard.delete_repo_archives=Supprimer toutes les archives de référentiels
|
||||
dashboard.delete_repo_archives_success=Toutes les archives de référentiels ont été supprimés avec succès.
|
||||
dashboard.git_gc_repos=Collecter les déchets des référentiels
|
||||
dashboard.git_gc_repos_success=Tous les référentiels ont effectué la collecte avec succès.
|
||||
dashboard.server_uptime=Durée de Marche Serveur
|
||||
dashboard.current_goroutine=Goroutines actuelles
|
||||
dashboard.current_memory_usage=Utilisation Mémoire actuelle
|
||||
dashboard.total_memory_allocated=Mémoire totale allouée
|
||||
dashboard.memory_obtained=Mémoire obtenue
|
||||
dashboard.pointer_lookup_times=Nombre de Consultations Pointeur
|
||||
dashboard.memory_allocate_times=Nombre d'Allocation Mémoire
|
||||
dashboard.memory_free_times=Nombre de Libération Mémoire
|
||||
dashboard.current_heap_usage=Utilisation Tas (Heap)
|
||||
dashboard.heap_memory_obtained=Mémoire Tas (Heap) obtenue
|
||||
dashboard.heap_memory_idle=Mémoire Tas (Heap) au Repos
|
||||
dashboard.heap_memory_in_use=Utilisation Mémoire Tas (Heap)
|
||||
dashboard.heap_memory_released=Mémoire Tas (Heap) libérée
|
||||
dashboard.heap_objects=Objets Tas (Heap)
|
||||
dashboard.bootstrap_stack_usage=Utilisation Pile Bootstrap
|
||||
dashboard.stack_memory_obtained=Mémoire Pile obtenue
|
||||
dashboard.mspan_structures_usage=Utilisation des Structures MSpan
|
||||
dashboard.mspan_structures_obtained=Structures MSpan obtenues
|
||||
dashboard.mcache_structures_usage=Utilisation des Structures MCache
|
||||
dashboard.mcache_structures_obtained=Structures MCache obtenues
|
||||
dashboard.profiling_bucket_hash_table_obtained=Profilage de Seau de Table de Hashage obtenu
|
||||
dashboard.gc_metadata_obtained=Métadonnées GC obtenues
|
||||
dashboard.other_system_allocation_obtained=Allocation de l'autre Système obtenue
|
||||
dashboard.next_gc_recycle=Traitement GC suivant
|
||||
dashboard.last_gc_time=Depuis le dernier GC
|
||||
dashboard.total_gc_time=Pause GC totale
|
||||
dashboard.total_gc_pause=Pause GC
|
||||
dashboard.last_gc_pause=Dernière Pause GC
|
||||
dashboard.gc_times=Nombres de GC
|
||||
|
||||
users.user_manage_panel=Gestion des Utilisateurs
|
||||
users.new_account=Créer un nouveau compte
|
||||
users.name=Nom
|
||||
users.activated=Activés
|
||||
users.admin=Administrateur
|
||||
users.repos=Repos
|
||||
users.created=Créés
|
||||
users.edit=Éditer
|
||||
users.auth_source=Source d'Autorisation
|
||||
users.local=Locales
|
||||
users.auth_login_name=Autorisation de connexion
|
||||
users.update_profile_success=Profil mis à jour avec succès.
|
||||
users.edit_account=Modifier le Compte
|
||||
users.is_activated=Ce compte est activé
|
||||
users.is_admin=Ce compte possède un niveau d'accès administrateur
|
||||
users.allow_git_hook=Ce compte dispose des autorisations pour créer des crochets de Git
|
||||
users.update_profile=Mettre le profil à jour
|
||||
users.delete_account=Supprimer ce Compte
|
||||
users.still_own_repo=Ce compte comporte toujours des propriétés de Référentiel. Vous devez d'abord les supprimer ou les transférer.
|
||||
users.still_has_org=Ce compte a toujours membres de l'organisation, vous avez à gauche ou supprimez tout d'abord.
|
||||
|
||||
orgs.org_manage_panel=Gestion des Organisations
|
||||
orgs.name=Nom
|
||||
orgs.teams=Équipes
|
||||
orgs.members=Membres
|
||||
|
||||
repos.repo_manage_panel=Gestion des Référentiels
|
||||
repos.owner=Propriétaire
|
||||
repos.name=Nom
|
||||
repos.private=Privé
|
||||
repos.watches=Suivi par
|
||||
repos.stars=Votes
|
||||
repos.issues=Problèmes
|
||||
|
||||
auths.auth_manage_panel=Gestion des Autorisations
|
||||
auths.new=Ajouter une Nouvelle Source d'Autorisation
|
||||
auths.name=Nom
|
||||
auths.type=Type
|
||||
auths.enabled=Activé
|
||||
auths.updated=Mis à jour
|
||||
auths.auth_type=Type d'Autorisation
|
||||
auths.auth_name=Nom d'Autorisation
|
||||
auths.domain=Domaine
|
||||
auths.host=Hôte
|
||||
auths.port=Port
|
||||
auths.base_dn=Base DN (Nom Distingué)
|
||||
auths.attributes=Rechercher les Attributs
|
||||
auths.filter=Filtre de recherche
|
||||
auths.ms_ad_sa=Ms Ad SA
|
||||
auths.smtp_auth=Type d'Autorisation SMTP
|
||||
auths.smtphost=Hôte SMTP
|
||||
auths.smtpport=Port SMTP
|
||||
auths.enable_tls=Activer le Chiffrement TLS
|
||||
auths.enable_auto_register=Connexion Automatique
|
||||
auths.tips=Conseils
|
||||
auths.edit=Modifier les Paramètres d'Autorisation
|
||||
auths.activated=Authentification activée
|
||||
auths.update_success=Paramètres d'autorisation mis à jour avec succès.
|
||||
auths.update=Mettre les Paramètres d'Autorisation à jour
|
||||
auths.delete=Supprimer cette Autorisation
|
||||
auths.delete_auth_title=Suppression d'Autorisation
|
||||
auths.delete_auth_desc=Cette autorisation sera supprimée. Continuer ?
|
||||
|
||||
config.server_config=Configuration du Serveur
|
||||
config.app_name=Nom de l'Application
|
||||
config.app_ver=Version de l'Application
|
||||
config.app_url=URL de l'Application
|
||||
config.domain=Domaine
|
||||
config.offline_mode=Mode hors-ligne
|
||||
config.disable_router_log=Désactiver la Journalisation du Routeur
|
||||
config.run_user=Entrer un Utilisateur
|
||||
config.run_mode=Mode d'Éxécution
|
||||
config.repo_root_path=Emplacement Racine du Référentiel
|
||||
config.static_file_root_path=Emplacement Racine du Fichier Statique
|
||||
config.log_file_root_path=Emplacement Racine du Fichier Journal
|
||||
config.script_type=Type de Script
|
||||
config.reverse_auth_user=Annuler l'Authentification de l'Utilisateur
|
||||
config.db_config=Configuration de la Base de Données
|
||||
config.db_type=Type
|
||||
config.db_host=Hôte
|
||||
config.db_name=Nom
|
||||
config.db_user=Utilisateur
|
||||
config.db_ssl_mode=Mode SSL
|
||||
config.db_ssl_mode_helper=("postgres" uniquement)
|
||||
config.db_path=Emplacement
|
||||
config.db_path_helper=("sqlite3" uniquement)
|
||||
config.service_config=Configuration du Service
|
||||
config.register_email_confirm=E-mail de Confirmation d'Enregistrement
|
||||
config.disable_register=Désactiver l'Enregistrement
|
||||
config.require_sign_in_view=Connexion Obligatoire pour Visualiser
|
||||
config.mail_notify=Mailer les Notifications
|
||||
config.enable_cache_avatar=Activer le Cache d'Avatar
|
||||
config.active_code_lives=Limites de Code Actif
|
||||
config.reset_password_code_lives=Réinitialiser le Mot De Passe des Limites de Code
|
||||
config.webhook_config=Configuration Webhook
|
||||
config.task_interval=Intervalles de Tâches
|
||||
config.deliver_timeout=Expiration d'Envoi
|
||||
config.mailer_config=Configuration du Maileur
|
||||
config.mailer_enabled=Activé
|
||||
config.mailer_name=Nom
|
||||
config.mailer_host=Hôte
|
||||
config.mailer_user=Utilisateur
|
||||
config.oauth_config=Configuration OAuth
|
||||
config.oauth_enabled=Activé
|
||||
config.cache_config=Configuration du Cache
|
||||
config.cache_adapter=Adaptateur du Cache
|
||||
config.cache_interval=Intervals du Cache
|
||||
config.cache_conn=Liaison du Cache
|
||||
config.session_config=Configuration de Session
|
||||
config.session_provider=Fournisseur de Session
|
||||
config.provider_config=Configurer le Fournisseur
|
||||
config.cookie_name=Nom du Cookie
|
||||
config.enable_set_cookie=Activer les Cookies
|
||||
config.gc_interval_time=Intervals GC
|
||||
config.session_life_time=Durée de Session
|
||||
config.https_only=HTTPS uniquement
|
||||
config.cookie_life_time=Expiration du Cookie
|
||||
config.picture_config=Configuration d'Image
|
||||
config.picture_service=Service d'Imagerie
|
||||
config.disable_gravatar=Désactiver Gravatar
|
||||
config.log_config=Configuration du Journal
|
||||
config.log_mode=Mode du Journal
|
||||
|
||||
monitor.cron=Tâches Cron
|
||||
monitor.name=Nom
|
||||
monitor.schedule=Planification
|
||||
monitor.next=Suivant
|
||||
monitor.previous=Précédent
|
||||
monitor.execute_times=Nombre d'Éxécutions
|
||||
monitor.process=Processus en cours d'Éxécution
|
||||
monitor.desc=Description
|
||||
monitor.start=Heure de Démarrage
|
||||
monitor.execute_time=Heure d'Éxécution
|
||||
|
||||
notices.system_notice_list=Notes Systèmes
|
||||
notices.type=Type
|
||||
notices.type_1=Référentiel
|
||||
notices.desc=Description
|
||||
notices.op=Auteur
|
||||
notices.delete_success=Note système supprimée avec succès.
|
||||
|
||||
[action]
|
||||
create_repo=a crée le Référentiel <a href="%s/%s">%s</a>
|
||||
commit_repo=a soumis à <a href="%s/%s/src/%s">%s</a> chez <a href="%s/%s">%s</a>
|
||||
create_issue=a ouvert un problème <a href="%s/%s/issues/%s">%s#%s</a>
|
||||
comment_issue=a commenté le problème <a href="%s/%s/issues/%s">%s#%s</a>
|
||||
transfer_repo=a transféré le Référentiel <code>%s</code> à <a href="/%s%s">%s</a>
|
||||
push_tag=a tagé <a href="%s/%s/src/%s">%s</a> à <a href="%s/%s">%s</a>
|
||||
compare_2_commits=Comparer ces 2 commissions
|
||||
|
||||
[tool]
|
||||
ago=auparavant
|
||||
from_now=à partir de maintenant
|
||||
now=maintenant
|
||||
1s=1 seconde %s
|
||||
1m=1 minute %s
|
||||
1h=1 heure %s
|
||||
1d=1 jour %s
|
||||
1w=1 semaine %s
|
||||
1mon=1 mois %s
|
||||
1y=1 an %s
|
||||
seconds=%d secondes %s
|
||||
minutes=%d minutes %s
|
||||
hours=%d heures %s
|
||||
days=%d jours %s
|
||||
weeks=%d semaines %s
|
||||
months=%d mois %s
|
||||
years=%d ans %s
|
||||
raw_seconds=secondes
|
||||
raw_minutes=minutes
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
718
conf/locale/locale_lv-LV.ini
Executable file
718
conf/locale/locale_lv-LV.ini
Executable file
@@ -0,0 +1,718 @@
|
||||
app_desc=Viegli uzstādāms Git serviss, kas rakstīts valodā Go
|
||||
|
||||
home=Sākums
|
||||
dashboard=Infopanelis
|
||||
explore=Izpētīt
|
||||
help=Palīdzība
|
||||
sign_in=Pierakstīties
|
||||
social_sign_in=Sociālā pieteikšanās: 2. solis <small>piesaistīt kontu</small>
|
||||
sign_out=Izrakstīties
|
||||
sign_up=Pieteikties
|
||||
register=Reģistrēties
|
||||
website=Mājas lapa
|
||||
version=Versija
|
||||
page=Lapa
|
||||
template=Sagatave
|
||||
language=Valoda
|
||||
|
||||
username=Lietotājvārds
|
||||
email=E-pasts
|
||||
password=Parole
|
||||
re_type=Parole atkārtoti
|
||||
captcha=Pārbaudes kods
|
||||
|
||||
repository=Repozitorijs
|
||||
organization=Organizācija
|
||||
mirror=Spogulis
|
||||
new_repo=Jauns repozitorijs
|
||||
new_migrate=Jauna migrācija
|
||||
new_fork=Jauns atdalītais repozitorijs
|
||||
new_org=Jauna organizācija
|
||||
manage_org=Pārvaldīt organizācijas
|
||||
admin_panel=Admin panelis
|
||||
account_settings=Konta iestatījumi
|
||||
settings=Iestatījumi
|
||||
|
||||
news_feed=Jaunumu plūsma
|
||||
pull_requests=Izmaiņu pieprasījumi
|
||||
issues=Problēmas
|
||||
|
||||
cancel=Atcelt
|
||||
|
||||
[install]
|
||||
install=Instalācija
|
||||
title=Instalācijas soļi pirmo reizi palaižot
|
||||
requite_db_desc=Gogs ir nepieciešama MySQL, PostgreSQL vai SQLite3 datu bāze.
|
||||
db_type=Datu bāzes veids
|
||||
host=Resursdators
|
||||
user=Lietotājs
|
||||
password=Parole
|
||||
db_name=Datu bāzes nosaukums
|
||||
db_helper=Nepieciešams izmantot MySQL INNODB dzini ar rakstzīmju kopu utf8_general_ci.
|
||||
ssl_mode=SSL režīms
|
||||
path=Ceļš
|
||||
sqlite_helper=SQLite 3 datu bāzes faila atrašanās vieta.
|
||||
general_title=Gogs vispārīgie iestatījumi
|
||||
repo_path=Repozitoriju glabāšanas vieta
|
||||
repo_path_helper=Visi Git attālinātie repozitoriji tiks glabāti šajā direktorijā.
|
||||
run_user=Izpildes lietotājs
|
||||
run_user_helper=Lietotājam ir jābūt rakstīšanas tiesībām repozitorija saknes direktorijai un Gogs jābūt palaistam zem šī lietotāja.
|
||||
domain=Domēns
|
||||
domain_helper=Tas ietekmē SSH klonēšanas URL.
|
||||
app_url=Lietotnes URL
|
||||
app_url_helper=Tas ietekmē HTTP/HTTPS klonēšanas URL un e-pasta saturā izsūtītās saites.
|
||||
email_title=E-pasta pakalpojuma iestatījumi (neobligāti)
|
||||
smtp_host=SMTP resursdators
|
||||
mailer_user=Sūtītāja e-pasta adrese
|
||||
mailer_password=Sūtītāja parole
|
||||
notify_title=Paziņojumu iestatījumi (neobligāti)
|
||||
register_confirm=Iespējot reģistrēšanās apstiprināšanu
|
||||
mail_notify=Iespējot e-pasta paziņojumus
|
||||
admin_title=Admin konta iestatījumi
|
||||
admin_name=Lietotājvārds
|
||||
admin_password=Parole
|
||||
confirm_password=Apstipriniet paroli
|
||||
admin_email=E-pasts
|
||||
install_gogs=Instalēt Gogs
|
||||
test_git_failed=Kļūda pārbaudot 'git' komandu: %v
|
||||
sqlite3_not_available=Jūsu versija neatbalsta SQLite3, lūdzu lejupielādējiet oficiālo bināro versiju no %s, NEVIS gobuild versiju.
|
||||
invalid_db_setting=Datu bāzes iestatījums nav pareizs: %v
|
||||
invalid_repo_path=Repozitorija atrašanās vieta ir nekorekta: %v
|
||||
run_user_not_match=Izpildes lietotājs nav pašreizējais lietotājs: %s -> %s
|
||||
save_config_failed=Neizdevās saglabāt konfigurāciju: %v
|
||||
invalid_admin_setting=Nekorekts admin konta iestatījums: %v
|
||||
install_success=Laipni lūdzam! Mēs priecājamies, ka Jūs izvēlaties Gogs, patīkamu lietošanu!
|
||||
|
||||
[home]
|
||||
uname_holder=Lietotājvārds vai e-pasts
|
||||
password_holder=Parole
|
||||
switch_dashboard_context=Mainīt infopaneļa kontekstu
|
||||
my_repos=Mani repozitoriji
|
||||
collaborative_repos=Sadarbības repozitoriji
|
||||
my_orgs=Manas organizācijas
|
||||
my_mirrors=Mani spoguļi
|
||||
|
||||
[explore]
|
||||
repos=Repozitoriji
|
||||
|
||||
[auth]
|
||||
create_new_account=Izveidot jaunu kontu
|
||||
register_hepler_msg=Jau ir konts? Pieraksties tagad!
|
||||
social_register_hepler_msg=Jau ir konts? Sasaisti tagad!
|
||||
disable_register_prompt=Atvainojiet, reģistrācija ir atspējota. Lūdzu, sazinieties ar vietnes administratoru.
|
||||
disable_register_mail=Atvainojiet, reģistrācijas e-pasta apstiprināšana ir atspējota.
|
||||
remember_me=Atcerēties mani
|
||||
forgot_password=Aizmirsu paroli
|
||||
forget_password=Aizmirsi paroli?
|
||||
sign_up_now=Nepieciešams konts? Reģistrējies tagad.
|
||||
confirmation_mail_sent_prompt=Jauns apstiprināšanas e-pasts ir nosūtīts uz <b>%s</b>, lūdzu, pārbaudies savu e-pasta kontu tuvāko %d stundu laikā, lai pabeigtu reģistrācijas procesu.
|
||||
sign_in_email=Atvērt savu e-pasta kontu
|
||||
active_your_account=Aktivizēt savu kontu
|
||||
resent_limit_prompt=Atvainojiet, Jūs sūtījāt aktivizācijas e-pastu pārāk bieži. Lūdzu, gaidiet 3 minūtes.
|
||||
has_unconfirmed_mail=Sveiki %s, Jums ir neapstiprināta e-pasta adrese (<b>%s</b>). Ja neesat saņēmis apstiprināšanas e-pastu vai Jums ir nepieciešams nosūtīt jaunu, lūdzu, nospiediet pogu, kas atrodas zemāk.
|
||||
resend_mail=Nospiediet šeit, lai vēlreiz nosūtītu aktivizācijas e-pastu
|
||||
email_not_associate=Šī e-pasta adrese nav saistīta ar Jūsu kontu.
|
||||
send_reset_mail=Spiediet šeit, lai nosūtītu paroles maiņas vēstuli uz Jūsu e-pastu
|
||||
reset_password=Atjaunot savu paroli
|
||||
invalid_code=Atvainojiet, Jūsu apstiprināšanas kodam ir beidzies derīguma termiņš vai arī tas ir nepareizs.
|
||||
reset_password_helper=Nospiediet šeit, lai atjaunotu paroli
|
||||
password_too_short=Paroles garums nedrīkst būt mazāks par 6.
|
||||
|
||||
[form]
|
||||
UserName=Lietotājvārds
|
||||
RepoName=Repozitorija nosaukums
|
||||
Email=E-pasta adrese
|
||||
Password=Parole
|
||||
Retype=Parole atkārtoti
|
||||
SSHTitle=SSH atslēgas nosaukums
|
||||
HttpsUrl=HTTPS URL
|
||||
PayloadUrl=Vērtuma URL
|
||||
TeamName=Komandas nosaukums
|
||||
AuthName=Autorizācijas nosaukums
|
||||
AdminEmail=Admin e-pasta adrese
|
||||
|
||||
require_error=` nedrīkst būt tukšs.`
|
||||
alpha_dash_error=` drīkst saturēt tikai latīņu alfabēta burtus, ciparus vai domuzīmes (-_).`
|
||||
alpha_dash_dot_error=` drīkst saturēt tikai latīņu alfabēta burtus, ciparus, domuzīmes (-_) vai punktu.`
|
||||
min_size_error=` jabūt vismaz %s simbolu garumā.`
|
||||
max_size_error=` jabūt ne mazāk kā %s simbolu garumā.`
|
||||
email_error=` nav derīga e-pasta adrese.`
|
||||
url_error=` nav korekts URL.`
|
||||
unknown_error=Nezināma kļūda:
|
||||
captcha_incorrect=Pārbaudes kods nesakrīt ar attēlā redzamo.
|
||||
password_not_match=Parole un atkārtoti ievadītā parole nav vienādas.
|
||||
|
||||
username_been_taken=Lietotājvārds ir jau aizņemts.
|
||||
repo_name_been_taken=Repozitorija vārds ir jau aizņemts.
|
||||
org_name_been_taken=Organizācijas nosaukums ir jau aizņemts.
|
||||
team_name_been_taken=Komandas nosaukums ir jau aizņemts.
|
||||
email_been_used=E-pasta adrese jau tiek izmantota.
|
||||
ssh_key_been_used=Publiskās atslēgas nosaukums jau tiek izmantos.
|
||||
illegal_username=Jūsu lietotājvārds satur neatļautas rakstzīmes.
|
||||
illegal_repo_name=Krātuves nosaukums satur neatļautas rakstzīmes.
|
||||
illegal_org_name=Organizācijas nosaukums satur neatļautas rakstzīmes.
|
||||
illegal_team_name=Grupas nosaukums satur neatļautas rakstzīmes.
|
||||
username_password_incorrect=Lietotājvārds vai parole nav pareiza.
|
||||
enterred_invalid_repo_name=Lūdzu, pārliecinieties, vai ievadītā repozitorija nosaukums ir pareizs.
|
||||
enterred_invalid_owner_name=Lūdzu, pārliecinieties, vai ievadītā īpašnieka vārds ir pareizs.
|
||||
enterred_invalid_password=Lūdzu pārliecinieties, vai Jūsu ievadītā parole ir pareiza.
|
||||
user_not_exist=Šāds lietotājs neeksistē.
|
||||
last_org_owner=Nav iespējams noņemt vienīgo komandas īpašnieku. Pirms tam ir nepieciešams norādīt jauno īpašnieku.
|
||||
|
||||
invalid_ssh_key=Atvainojiet, nav iespējams pārbaudīt Jūsu SSH atslēgu: %s
|
||||
unable_verify_ssh_key=Nav iespējams pārbaudīt jūsu SSH atslēgu, bet tiks pieņemts, ka tā ir derīga, lūdzu, pārliecinieties par to pats.
|
||||
auth_failed=Autentifikācija neizdevās: %v
|
||||
|
||||
still_own_repo=Jūsu esat vismaz viena repozitorija īpašnieks, tos sākumā ir nepieciešams izdzēst vai nomainīt to īpašnieku.
|
||||
still_has_org=Jūsu esat vismaz vienas organizācijas biedrs, sākumā nepieciešams pamest vai izdzēst šo organizāciju.
|
||||
org_still_own_repo=Šī organizācija ir vismaz viena repozitorija īpašnieks, tos sākumā ir nepieciešams izdzēst vai nomainīt to īpašnieku.
|
||||
|
||||
still_own_user=Šo autentifikāciju joprojām izmanto vismaz viens lietotājs, nepieciešams šiem lietotājiem nomainīt autentifikācijas veidu vai tos izdzēst.
|
||||
|
||||
target_branch_not_exist=Mērķa atzars neeksistē
|
||||
|
||||
[user]
|
||||
change_avatar=Mainīt savu profila attēlu vietnē gravatar.com
|
||||
change_custom_avatar=Mainīt savu profila attēlu iestatījumos
|
||||
join_on=Pievienojās
|
||||
repositories=Repozitoriji
|
||||
activity=Publiskā aktivitāte
|
||||
followers=Sekotāji
|
||||
starred=Atzīmēti ar zvaigznīti
|
||||
following=Seko
|
||||
|
||||
[settings]
|
||||
profile=Profils
|
||||
password=Parole
|
||||
ssh_keys=SSH atslēgas
|
||||
social=Sociālie konti
|
||||
applications=Lietotnes
|
||||
orgs=Organizācijas
|
||||
delete=Dzēst kontu
|
||||
uid=Lietotāja ID
|
||||
|
||||
public_profile=Publiskais profils
|
||||
profile_desc=Jūsu e-pasta adrese ir publiska un tiks izmantota, lai nosūtītju Jums paziņojumus, kas saistīti ar Jūsu kontu vai darbībām veiktām caur šo mājas lapu.
|
||||
full_name=Pilns vārds
|
||||
website=Mājas lapa
|
||||
location=Atrašanās vieta
|
||||
update_profile=Mainīt profilu
|
||||
update_profile_success=Jūsu profila dati ir veiksmīgi saglabāti.
|
||||
change_username=Lietotāja vārds mainīts
|
||||
change_username_desc=Lietotājvārds tiks mainīts, vai vēlaties turpināt? Tas ietekmēs visas saites, kas attiecas uz Jūsu kontu.
|
||||
continue=Turpināt
|
||||
cancel=Atcelt
|
||||
|
||||
enable_custom_avatar=Iespējot maināmu profila attēlu
|
||||
enable_custom_avatar_helper=Iespējojiet šo, lai atslēgtu profilu attēlu ņemšanu no gravatar.com
|
||||
choose_new_avatar=Izvēlēties jaunu profila attēlu
|
||||
update_avatar=Saglabāt profila bildi
|
||||
uploaded_avatar_not_a_image=Augšupielādētais fails nav attēls.
|
||||
no_custom_avatar_available=Nav iespējams mainīt profila bildi.
|
||||
update_avatar_success=Jūsu profila bilde tika veiksmīgi saglabāta.
|
||||
|
||||
change_password=Mainīt paroli
|
||||
old_password=Pašreizējā parole
|
||||
new_password=Jauna parole
|
||||
password_incorrect=Ievadīta nepareiza pašreizējā parole.
|
||||
change_password_success=Parole tika veiksmīgi nomainīta. Tagad jūs varat pieraksītites, izmantojot jauno paroli.
|
||||
|
||||
manage_ssh_keys=Pārvaldīt SSH atslēgas
|
||||
add_key=Pievienot atslēgu
|
||||
ssh_desc=Šis ir saraksts ar Jūsu kontam piesaistītajām SSH atslēgām. Dzēsiet visas, kuras Jūs neatpazīstat.
|
||||
ssh_helper=<strong>Vajadzīga palīdzība?</strong> Apskatieties pamācību kā <a href="%s">ģenerēt SSH atslēgas</a> vai kā novērst <a href="%s">biežāk sastopamās SSH problēmas</a>.
|
||||
add_new_key=Pievienot SSH atslēgu
|
||||
key_name=Atslēgas nosaukums
|
||||
key_content=Saturs
|
||||
add_key_success=Pievienota jauna SSH atslēga!
|
||||
delete_key=Dzēst
|
||||
add_on=Pievienota
|
||||
last_used=Pēdējo reizi izmantota
|
||||
no_activity=Nav nesenas aktivitātes
|
||||
|
||||
manage_social=Pārvaldīt piesaistītos sociālos kontus
|
||||
social_desc=Šeit tiek attēloti visi sociālie konti, kas ir piesaistīti Jūsu kontam. Dzēsiet visus, kurus Jūs neatpazīstat.
|
||||
unbind=Atsaistīt
|
||||
unbind_success=Sociālais konts tika atsaistīts.
|
||||
|
||||
manage_access_token=Pārvaldīt personīgos piekļuves talonus
|
||||
generate_new_token=Ģenerēt jaunu talonu
|
||||
tokens_desc=Talons tika uzģēnerēts, tagad varat to izmantot, lai piekļūtu Gogs API.
|
||||
new_token_desc=Pašlaik visiem taloniem ir pilna piekļuve Jūsu kontam.
|
||||
token_name=Talona nosaukums
|
||||
generate_token=Ģenerēt talonu
|
||||
generate_token_succees=Jauns piekļuves talons tika veiksmīgi uzģenerēts! Pārliecinieties, ka esat to nokopējis, jo to Jums vairāk nebūs iespēja izdarīt!
|
||||
delete_token=Dzēst
|
||||
delete_token_success=Jūsu personīgās piekļuves talons tika veiksmīgi izdzēsts! Neazimistiet veikt nepieciešamos labojumus savās lietojumprogrammās, kas to izmantoja.
|
||||
|
||||
delete_account=Dzēst savu kontu
|
||||
delete_prompt=Šī darbība pilnībā izdzēsīs Jūsu kontu, kā arī tā ir <strong>NEATGRIEZENISKA</strong>!
|
||||
confirm_delete_account=Apstiprināt dzēšanu
|
||||
delete_account_title=Konta dzēšana
|
||||
delete_account_desc=Šis konts tiks neatgriezeniski dzēsts, vai vēlaties turpināt?
|
||||
|
||||
[repo]
|
||||
owner=Īpašnieks
|
||||
repo_name=Repozitorija nosaukums
|
||||
repo_name_helper=Labi repzotoriju nosaukumi ir īsi, tādi kurus viegli atcerēties un <strong>unikāli</strong>.
|
||||
visibility=Redzamība
|
||||
visiblity_helper=Šis repozitorijs ir <span class="label label-red label-radius">Privāts</span>
|
||||
fork_repo=Atdalīt repozitoriju
|
||||
fork_from=Atdalīt no
|
||||
fork_visiblity_helper=Atdalītam repozitorijam nav iespējams nomainīt tā redzamību
|
||||
repo_desc=Apraksts
|
||||
repo_lang=Valoda
|
||||
repo_lang_helper=Izvēlieties .gitignore failu
|
||||
license=Licence
|
||||
license_helper=Izvēlieties licences failu
|
||||
init_readme=Inicializēt šo repozitoriju ar README.md failu
|
||||
create_repo=Izveidot repozitoriju
|
||||
default_branch=Noklusējuma atzars
|
||||
mirror_interval=Spoguļošanas intervāls (stundās)
|
||||
goget_meta=Go-Get metadati
|
||||
goget_meta_helper=Šis repozitorijs saturēs <span class="label label-blue label-radius">Go-Get</span> metadatus
|
||||
|
||||
need_auth=Nepieciešama autorizācija
|
||||
migrate_type=Migrācijas veids
|
||||
migrate_type_helper=Šis repozitorijs būs <span class="label label-blue label-radius">Spoguļots</span>
|
||||
migrate_repo=Migrēt repozitoriju
|
||||
|
||||
copy_link=Kopēt
|
||||
click_to_copy=Kopēt uz starpliktuvi
|
||||
copied=Kopēšana notikusi veiksmīgi
|
||||
clone_helper=Nepieciešama palīdzība kā veikt klonēšana? Apmeklējiet <a target="_blank" href="%s">Palīdzība</a> lapu!
|
||||
unwatch=Nevērot
|
||||
watch=Vērot
|
||||
unstar=Noņemt zvaigznīti
|
||||
star=Pievienot zvaigznīti
|
||||
fork=Atdalīts
|
||||
|
||||
no_desc=Nav apraksta
|
||||
quick_guide=Īsa pamācība
|
||||
clone_this_repo=Klonēt šo repozitoriju
|
||||
create_new_repo_command=Izveidot jaunu repozitoriju komandrindā
|
||||
push_exist_repo=Nosūtīt izmaiņas no komandrindas eksistējošam repozitorijam
|
||||
|
||||
branch=Atzars
|
||||
tree=Koks
|
||||
branch_and_tags=Atzari un birkas
|
||||
branches=Atzari
|
||||
tags=Birkas
|
||||
issues=Problēmas
|
||||
commits=Revīzijas
|
||||
releases=Laidieni
|
||||
file_raw=Neapstrādāts
|
||||
file_history=Vēsture
|
||||
file_view_raw=Rādīt neapstrādātu
|
||||
|
||||
commits.commits=Revīzijas
|
||||
commits.search=Meklēt revīzijas
|
||||
commits.find=Meklēt
|
||||
commits.author=Autors
|
||||
commits.message=Ziņojums
|
||||
commits.date=Datums
|
||||
commits.older=Vecāki
|
||||
commits.newer=Jaunāki
|
||||
|
||||
settings=Iestatījumi
|
||||
settings.options=Opcijas
|
||||
settings.collaboration=Sadarbība
|
||||
settings.hooks=Tīmekļa āķi
|
||||
settings.githooks=Git āķi
|
||||
settings.deploy_keys=Izvietot atslēgas
|
||||
settings.basic_settings=Pamatiestatījumi
|
||||
settings.danger_zone=Bīstamā zona
|
||||
settings.site=Oficiālā mājas lapa
|
||||
settings.update_settings=Mainīt iestatījumus
|
||||
settings.change_reponame=Mainīts repozitorija nosaukums
|
||||
settings.change_reponame_desc=Repozitorija nosaukums tiks mainīts, vai vēlaties turpināt? Tas ietekmēs visas saites, kas saistītas ar šo repozitoriju.
|
||||
settings.transfer=Mainīt īpašnieku
|
||||
settings.transfer_desc=Mainīt šī repozitorija īpašnieku uz citu lietotāju vai organizāciju, kurai Jums ir administratora tiesībs.
|
||||
settings.new_owner_has_same_repo=Jaunajam īpašniekam jau ir repozitorijs ar šādu nosaukumu.
|
||||
settings.delete=Dzēst šo repozitoriju
|
||||
settings.delete_desc=Dzēšot repozitoriju, tā datus vairs nebūs iespējams atgūt. Pirms dzēšanas pārliecinieites vai patiešām vēlaties to darīt.
|
||||
settings.transfer_notices=<p>- Jūs zaudēsiet piekļuvi repozitorijam, ja jaunais īpašnieks ir individuāls lietotājs.</p><p>- Jūs saglabāsiet piekļuvi repzitorijam, ja jaunais īpašneiks ir organizācija un Jūs esat viens no tās īpašniekiem.</p>
|
||||
settings.update_settings_success=Repozitorija opcijas ir veiksmīgi saglabātas.
|
||||
settings.transfer_owner=Jaunais īpašnieks
|
||||
settings.make_transfer=Mainīt
|
||||
settings.transfer_succeed=Repozitorija īpašnieks ir veiksmīgi nomainīts.
|
||||
settings.confirm_delete=Apstiprināt dzēšanu
|
||||
settings.add_collaborator=Pievienot jaunu līdzstrādnieku
|
||||
settings.add_collaborator_success=Jauns līdzstrādnieks ir pievienots.
|
||||
settings.remove_collaborator_success=Līdzstrādnieks tika noņemts.
|
||||
settings.user_is_org_member=Lietotājs ir organizācijas biedrs, kas nevar tikt pievienots kā līdzstrādnieks.
|
||||
settings.add_webhook=Pievienot tīmekļa āķi
|
||||
settings.hooks_desc=Tīmekļa āķi ļauj paziņot ārējiem servisiem par noteiktiem notikomiem, kas notiek Git servisā. Kad iestāsies kāds notikums, katram ārējā servisa URL tiks nosūtīts POST pieprasījums. Lai uzzinātu sīkāk skatieties <a target="_blank" href="%s">Tīmekļa āķu rokasgrāmatā</a>.
|
||||
settings.githooks_desc=Git āķus apstrādā pats Git. Jūs varat labot atbalsīto āku failus sarakstā zemāk, lai veiktu pielāgotas darbības.
|
||||
settings.githook_edit_desc=Ja āķis nav aktīvs, tiks attēlots piemērs kā to izmantot. Atstājot āķa saturu tukšu, tas tiks atspējots.
|
||||
settings.githook_name=Āķa nosaukums
|
||||
settings.githook_content=Āķa saturs
|
||||
settings.update_githook=Labot āķi
|
||||
settings.remove_hook_success=Tīmekļa āķis tika noņemts.
|
||||
settings.add_webhook_desc=Uz norādīto URL tiks nosūtīts <code>POST</code> pieprasījums ar notikuma datiem. Jūs varat norādīt arī datu formātu, kādā datus vēlaties saņemt (JSON, <code>x-www-form-urlencoded</code> <em>utt.</em>). Detalizētāku informāciju ir iespējams uzzināt <a target="_blank" href="%s">Tīmekļa āķu rokasgrāmatā</a>.
|
||||
settings.payload_url=Vērtuma URL
|
||||
settings.content_type=Satura tips
|
||||
settings.secret=Noslēpums
|
||||
settings.event_desc=Kādu notikumu rezultātā tiktu izsaukts tīmekļā āķis?
|
||||
settings.event_push_only=Tikai izmaiņu nosūtīšanas notikumiem.
|
||||
settings.active=Aktīvs
|
||||
settings.active_helper=Tiks nosūtīti notikuma dati, kad nostrādās šis āķis.
|
||||
settings.add_hook_success=Jauns tīmekļa āķis tika veiksmīgi pievienots.
|
||||
settings.update_webhook=Mainīt tīmekļa āķi
|
||||
settings.update_hook_success=Tīmekļa āķist tika veiksmīgi saglabāts.
|
||||
settings.delete_webhook=Dzēst tīmekļa āķi
|
||||
settings.recent_deliveries=Pēdējās piegādes
|
||||
settings.hook_type=Āķa veids
|
||||
settings.add_slack_hook_desc=PIevienot <a href="%s">Slack</a> integrāciju Jūsu repozitorijā.
|
||||
settings.slack_token=Talons
|
||||
settings.slack_domain=Domēns
|
||||
settings.slack_channel=Kanāls
|
||||
|
||||
diff.browse_source=Pārlūkot izejas kodu
|
||||
diff.parent=vecāks
|
||||
diff.commit=revīzija
|
||||
diff.data_not_available=Salīdzināšanas dati nav pieejami.
|
||||
diff.show_diff_stats=Rādīt salīdzināšanas statistiku
|
||||
diff.stats_desc=<strong>%d mainītis faili</strong> ar <strong>%d papildinājumiem</strong> un <strong>%d dzēšanām</strong>
|
||||
diff.bin=BIN
|
||||
diff.view_file=Parādīt failu
|
||||
|
||||
release.releases=Releases
|
||||
release.new_release=New Release
|
||||
release.draft=Draft
|
||||
release.prerelease=Pre-Release
|
||||
release.stable=Stable
|
||||
release.edit=edit
|
||||
release.ahead=<strong>%d</strong> commits to %s since this release
|
||||
release.source_code=Source Code
|
||||
release.tag_name=Tag name
|
||||
release.target=Target
|
||||
release.tag_helper=Choose an existing tag, or create a new tag on publish.
|
||||
release.release_title=Release title
|
||||
release.content_with_md=Content with <a href="%s">Markdown</a>
|
||||
release.write=Write
|
||||
release.preview=Preview
|
||||
release.content_placeholder=Write some content
|
||||
release.loading=Loading...
|
||||
release.prerelease_desc=This is a pre-release
|
||||
release.prerelease_helper=We’ll point out that this release is identified as non-production ready.
|
||||
release.publish=Publish Release
|
||||
release.save_draft=Save Draft
|
||||
release.edit_release=Edit Release
|
||||
release.tag_name_already_exist=Release with this tag name has already existed.
|
||||
|
||||
[org]
|
||||
org_name_holder=Organizācijas nosaukums
|
||||
org_name_helper=Labi organizāciju nosaukumi ir īsi un tādi, kurus viegli atcerēties.
|
||||
org_email_helper=Uz organizācijas e-pastu tiks sūtītas visas notifikācias un apstiprinājumi.
|
||||
create_org=Izveidot organizāciju
|
||||
repo_updated=Atjaunināts
|
||||
people=Personas
|
||||
invite_someone=Uzaicināt kādu
|
||||
teams=Komandas
|
||||
lower_members=dalībnieki
|
||||
lower_repositories=repozitoriji
|
||||
create_new_team=Izveidot jaunu komandu
|
||||
org_desc=Apraksts
|
||||
team_name=Komandas nosaukums
|
||||
team_desc=Apraksts
|
||||
team_name_helper=Šo nosaukumu varēs izmantot, lai pieminētu komandu sarunās.
|
||||
team_desc_helper=Komandas apraksts
|
||||
team_permission_desc=Kādām tiesībām šai komandai būtu jābūt?
|
||||
|
||||
settings=Iestatījumi
|
||||
settings.options=Opcijas
|
||||
settings.full_name=Pilns vārds, uzvārds
|
||||
settings.website=Mājas lapa
|
||||
settings.location=Atrašanās vieta
|
||||
settings.update_settings=Mainīt iestatījumus
|
||||
settings.change_orgname=Mainīts organizācijas nosaukums
|
||||
settings.change_orgname_desc=Organizācijas nosaukums tiks mainīts, vai vēlaties turpinat? Tas ietekmēs saites, kas attiecas uz šo organizāciju.
|
||||
settings.update_setting_success=Organizācijas iestatījumi tika veiksmīgi saglabāti.
|
||||
settings.delete=Dzēst organizāciju
|
||||
settings.delete_account=Dzēst šo organizāciju
|
||||
settings.delete_prompt=Šī darbība pilnībā dzēsīs šo organizāciju, kā arī tā ir <strong>NEATGRIEZENISKA</strong>!
|
||||
settings.confirm_delete_account=Apstiprināt dzēšanu
|
||||
settings.delete_org_title=Organizācijas dzēšana
|
||||
settings.delete_org_desc=Šī organizācija tiks pilnībā izdzēsta, vai vēlaties turpināt?
|
||||
settings.hooks_desc=Pievienot tīmekļa āķus, kas nostrādās <strong>visiem repozitorijiem</strong> šajā organizācijā.
|
||||
|
||||
members.public=Publisks
|
||||
members.public_helper=padarīt privātu
|
||||
members.private=Privāts
|
||||
members.private_helper=padarīt publisku
|
||||
members.owner=Īpašnieks
|
||||
members.member=Biedri
|
||||
members.conceal=Noslēpt
|
||||
members.remove=Noņemt
|
||||
members.leave=Atstāt
|
||||
members.invite_desc=Sāciet rakstīt lietotājvārdu, lai uzaicinātu jaunu biedru organizācijā %s:
|
||||
members.invite_now=Uzaicināt tagad
|
||||
|
||||
teams.join=Pievienoties
|
||||
teams.leave=Atstāt
|
||||
teams.read_access=Lasīšanas piekļuve
|
||||
teams.read_access_helper=Komanda varēs skatīties un klonēt šīs organizācijas repozitorijus.
|
||||
teams.write_access=Rakstīšanas piekļuve
|
||||
teams.write_access_helper=Komanda varēs skatīties un klonēt, kā arī nosūtīt izmaiņas šīs organizācijas repozitorijiem.
|
||||
teams.admin_access=Administratora piekļuve
|
||||
teams.admin_access_helper=Šī komanda varēs veikt push/pull komandas tās repozitorijiem, kā arī tiem pievienot citus līdzstrādniekus.
|
||||
teams.no_desc=Komandai nav apraksta
|
||||
teams.settings=Iestatījumi
|
||||
teams.owners_permission_desc=Īpašniekiem ir pilna piekļuve <strong>visiem repozitorijiem</strong> un ir organizācijas <strong>administratora tiesības</strong>.
|
||||
teams.members=Komandas biedri
|
||||
teams.update_settings=Saglabāt iestatījumus
|
||||
teams.delete_team=Dzēst komandu
|
||||
teams.add_team_member=Pievienot komandas biedru
|
||||
teams.delete_team_title=Komandas dzēšana
|
||||
teams.delete_team_desc=Komanda tiks dzēsta, vai vēlaties turpināt? Komandas biedri var zaudēt piekļuvi dažiem vai pat visiem repozitorijiem.
|
||||
teams.delete_team_success=Komanda tika veiksmīgi izdzēsta.
|
||||
teams.read_permission_desc=Šai komandai ir <strong>lasīšanas</strong> tiesības: dalībnieki var skatīties un klonēt komandas repozitorijus.
|
||||
teams.write_permission_desc=Šai komandai ir <strong>rakstīšanas</strong> tiesības: dalībnieki var lasīt un nosūtīt izmaiņas repozitorijiem.
|
||||
teams.admin_permission_desc=Šai komandai ir <strong>administratora</strong> tiesības: dalībnieki var lasīt, rakstīt un pievienot citus dalībniekus komandas repozitorijiem.
|
||||
teams.repositories=Komandas repozitoriji
|
||||
teams.add_team_repository=Pievienot komandas repozitoriju
|
||||
teams.remove_repo=Noņemt
|
||||
teams.add_nonexistent_repo=Repozitorijs, kuram Jūs mēģinat pievienot neeksistē, sākumā izveidojiet to.
|
||||
|
||||
[admin]
|
||||
dashboard=Infopanelis
|
||||
users=Lietotāji
|
||||
organizations=Organizācijas
|
||||
repositories=Repozitoriji
|
||||
authentication=Autentifikācijas
|
||||
config=Konfigurācija
|
||||
notices=Sistēmas paziņojumi
|
||||
monitor=Uzraudzība
|
||||
prev=Iepr.
|
||||
next=Tālāk
|
||||
|
||||
dashboard.statistic=Statistika
|
||||
dashboard.operations=Darbības
|
||||
dashboard.system_status=Sistēmas uzraudzības statuss
|
||||
dashboard.statistic_info=Gogs datu bāze satur <b>%d</b> lietotājus, <b>%d</b> organizācijas, <b>%d</b> publiskās atslēgas, <b>%d</b> repozitorijus, <b>%d</b> vērošanas, <b>%d</b> atzīmētas zvaigznītes, <b>%d</b> darbības, <b>%d</b> piekļuves, <b>%d</b> problēmas, <b>%d</b> komentārus, <b>%d</b> sociālos kontus, <b>%d</b> sekošanas, <b>%d</b> spoguļošanas, <b>%d</b> izlaides, <b>%d</b> login sources, <b>%d</b> tīmekļa āķus, <b>%d</b> starpposmus, <b>%d</b> etiķetes, <b>%d</b> āķu uzdevumus, <b>%d</b> komandas, <b>%d</b> labotus uzdevumus, <b>%d</b> pielikumus.
|
||||
dashboard.operation_name=Darbības nosaukums
|
||||
dashboard.operation_switch=Pārslēgt
|
||||
dashboard.operation_run=Palaist
|
||||
dashboard.clean_unbind_oauth=Notīrīt nesaistītās OAuth biļetes
|
||||
dashboard.clean_unbind_oauth_success=Visas nesaistītās OAuth biļetes tika veiksmīgi izdzēstas.
|
||||
dashboard.delete_inactivate_accounts=Dzēst visus neaktīvos kontus
|
||||
dashboard.delete_inactivate_accounts_success=Visi neaktīvie kotni tika veiksmīgi izdzēsti.
|
||||
dashboard.delete_repo_archives=Dzēst visu repozitoriju arhīvus
|
||||
dashboard.delete_repo_archives_success=Visu repozitoriju arhīvi tika veiksmīgi izdzēsti.
|
||||
dashboard.git_gc_repos=Veikt repozitoriju datu sakārtošānu (git gc)
|
||||
dashboard.git_gc_repos_success=Datu sakārtošana visiem repozitorijiem veiksmīgi pabeigta.
|
||||
dashboard.server_uptime=Servera darbības laiks
|
||||
dashboard.current_goroutine=Izmantotās Gorutīnas
|
||||
dashboard.current_memory_usage=Pašreiz izmantotā atmiņa
|
||||
dashboard.total_memory_allocated=Kopējā piešķirtā atmiņa
|
||||
dashboard.memory_obtained=Iegūtā atmiņa
|
||||
dashboard.pointer_lookup_times=Rādītāju meklēšanas reizes
|
||||
dashboard.memory_allocate_times=Atmiņas piešķiršanas reizes
|
||||
dashboard.memory_free_times=Atmiņas atbrīvošanas reizes
|
||||
dashboard.current_heap_usage=Pašreizējā kaudzes izmantošana
|
||||
dashboard.heap_memory_obtained=Iegūtā kaudzes atmiņa
|
||||
dashboard.heap_memory_idle=Neizmantotā kaudzes atmiņa
|
||||
dashboard.heap_memory_in_use=Izmantotā kaudzes atmiņa
|
||||
dashboard.heap_memory_released=Atbrīvotā kaudzes atmiņa
|
||||
dashboard.heap_objects=Kaudzes atmiņas objekti
|
||||
dashboard.bootstrap_stack_usage=Izmantotais sāknēšanas steka lielums
|
||||
dashboard.stack_memory_obtained=Iegūtā steka atmiņa
|
||||
dashboard.mspan_structures_usage=Izmantotās MSpan struktūras
|
||||
dashboard.mspan_structures_obtained=Iegūtās MSpan struktūras
|
||||
dashboard.mcache_structures_usage=Izmantotās MCache struktūras
|
||||
dashboard.mcache_structures_obtained=Iegūtās MCache struktūras
|
||||
dashboard.profiling_bucket_hash_table_obtained=Iegūtā profilēšanas kausa jaucējtabula
|
||||
dashboard.gc_metadata_obtained=Iegūtie GC metadati
|
||||
dashboard.other_system_allocation_obtained=Iegūtās citas sistēmas sadales
|
||||
dashboard.next_gc_recycle=Nākošā GC atkritne
|
||||
dashboard.last_gc_time=Laiks kopš pēdējās GC
|
||||
dashboard.total_gc_time=Kopējais GC izpildes laiks
|
||||
dashboard.total_gc_pause=Kopējais GC izpildes laiks
|
||||
dashboard.last_gc_pause=Pedējās GC izpildes laiks
|
||||
dashboard.gc_times=GC reizes
|
||||
|
||||
users.user_manage_panel=Lietotāju pārvaldības panelis
|
||||
users.new_account=Izveidot jaunu kontu
|
||||
users.name=Vārds
|
||||
users.activated=Aktivizēts
|
||||
users.admin=Administrators
|
||||
users.repos=Repozitoriji
|
||||
users.created=Izveidots
|
||||
users.edit=Labot
|
||||
users.auth_source=Autorizācijas avots
|
||||
users.local=Iebūvētā
|
||||
users.auth_login_name=Autorizāciju, pietiekšanās vārds
|
||||
users.update_profile_success=Konta profils tika veiksmīgi saglabāts.
|
||||
users.edit_account=Labot kontu
|
||||
users.is_activated=Konts ir aktivizēts
|
||||
users.is_admin=Šim kontam ir administratora piekļuves tiesības
|
||||
users.allow_git_hook=Šim kontam ir tiesības pievienot/labot Git āķus
|
||||
users.update_profile=Mainīt konta profilu
|
||||
users.delete_account=Dzēst šo kontu
|
||||
users.still_own_repo=Šis konts ir vismaz viena repozitorija īpašnieks, tos sākumā ir nepieciešams izdzēst vai nomainīt to īpašnieku.
|
||||
users.still_has_org=Šis konts ir vismaz vienas organizācijas biedrs, sākumā nepieciešams pamest vai izdzēst šo organizāciju.
|
||||
|
||||
orgs.org_manage_panel=Organizāciju pārvaldības panelis
|
||||
orgs.name=Nosaukums
|
||||
orgs.teams=Komandas
|
||||
orgs.members=Dalībnieki
|
||||
|
||||
repos.repo_manage_panel=Repozitoriju pārvaldības panelis
|
||||
repos.owner=Īpašnieks
|
||||
repos.name=Vārds
|
||||
repos.private=Privāts
|
||||
repos.watches=Vērošana
|
||||
repos.stars=Atzīmētās zvaigznītes
|
||||
repos.issues=Problēmas
|
||||
|
||||
auths.auth_manage_panel=Autorizāciju pārvaldības panelis
|
||||
auths.new=Pievienot jaunu autorizācijas veidu
|
||||
auths.name=Nosaukums
|
||||
auths.type=Veids
|
||||
auths.enabled=Iespējota
|
||||
auths.updated=Atjaunināta
|
||||
auths.auth_type=Autorizācijas veids
|
||||
auths.auth_name=Autorizācijas nosaukums
|
||||
auths.domain=Domēns
|
||||
auths.host=Resursdators
|
||||
auths.port=Ports
|
||||
auths.base_dn=Pamata DN
|
||||
auths.attributes=Meklēšanas atribūti
|
||||
auths.filter=Meklēšanas filtrs
|
||||
auths.ms_ad_sa=MS Ad SA
|
||||
auths.smtp_auth=SMTP autorizācijas veids
|
||||
auths.smtphost=SMTP resursdators
|
||||
auths.smtpport=SMTP ports
|
||||
auths.enable_tls=Iespējot TLS šifrēšanu
|
||||
auths.enable_auto_register=Iespējot automātisko reģistrāciju
|
||||
auths.tips=Padomi
|
||||
auths.edit=Labot autorizācijas iestatījumus
|
||||
auths.activated=Autentifikācija ir aktivizēta
|
||||
auths.update_success=Autorizācijas iestatījumi tika veiksmīgi saglabāti.
|
||||
auths.update=Mainīt autorizācijas iestatījumus
|
||||
auths.delete=Dzēst šo autorizāciju
|
||||
auths.delete_auth_title=Autorizācijas dzēšana
|
||||
auths.delete_auth_desc=Šī autorizācija tiks dzēsta, vai vēlaties turpināt?
|
||||
|
||||
config.server_config=Servera konfigurācija
|
||||
config.app_name=Lietotnes nosaukums
|
||||
config.app_ver=Lietotnes versija
|
||||
config.app_url=Lietotnes URL
|
||||
config.domain=Domēns
|
||||
config.offline_mode=Bezsaistes režīms
|
||||
config.disable_router_log=Atspējot maršrutētāja žurnalizēšanu
|
||||
config.run_user=Izpildes lietotājs
|
||||
config.run_mode=Izpildes režīms
|
||||
config.repo_root_path=Repozitoriju glabāšanas vieta
|
||||
config.static_file_root_path=Statisko failu atrašanās vieta
|
||||
config.log_file_root_path=Žurnalizēšanas failu glabāšanas vieta
|
||||
config.script_type=Skripta veids
|
||||
config.reverse_auth_user=Reversā lietotāja autentifikācija
|
||||
config.db_config=Datu bāzes konfigurācija
|
||||
config.db_type=Veids
|
||||
config.db_host=Resursdators
|
||||
config.db_name=Nosaukums
|
||||
config.db_user=Lietotājs
|
||||
config.db_ssl_mode=SSL režīms
|
||||
config.db_ssl_mode_helper=(tikai PostgreSQL datu bāzei)
|
||||
config.db_path=Ceļš
|
||||
config.db_path_helper=(tikai Sqlite3 datu bāzei)
|
||||
config.service_config=Pakalpojuma konfigurācija
|
||||
config.register_email_confirm=E-pasta reģistrēšanas apstiprināšana
|
||||
config.disable_register=Atspējot jaunu lietotāju reģistrāciju
|
||||
config.require_sign_in_view=Nepieciešama autorizācija
|
||||
config.mail_notify=Pasta paziņojumi
|
||||
config.enable_cache_avatar=Glabāt profila attēlus kešatmiņā
|
||||
config.active_code_lives=Aktīvā koda ilgums
|
||||
config.reset_password_code_lives=Paroles atiestatīšanas koda ilgums
|
||||
config.webhook_config=Tīkla āķu konfigurācija
|
||||
config.task_interval=Uzdevuma intervāls
|
||||
config.deliver_timeout=Piegādes noildze
|
||||
config.mailer_config=Sūtītāja konfigurācija
|
||||
config.mailer_enabled=Iespējots
|
||||
config.mailer_name=Nosaukums
|
||||
config.mailer_host=Resursdators
|
||||
config.mailer_user=Lietotājs
|
||||
config.oauth_config=OAuth konfigurācija
|
||||
config.oauth_enabled=Iespējota
|
||||
config.cache_config=Kešatmiņas konfigurācija
|
||||
config.cache_adapter=Kešatmiņas adapteris
|
||||
config.cache_interval=Kešatmiņas intervāls
|
||||
config.cache_conn=Kešatmiņas pieslēguma parametri
|
||||
config.session_config=Sesijas konfigurācja
|
||||
config.session_provider=Sesijas nodrošinātājs
|
||||
config.provider_config=Pakalpojumu sniedzēja konfigurācija
|
||||
config.cookie_name=Sīkdatnes nosaukums
|
||||
config.enable_set_cookie=Ļaut izmantot sīkdatnes
|
||||
config.gc_interval_time=GC laika intervāls
|
||||
config.session_life_time=Sesijas ilgums
|
||||
config.https_only=Tikai HTTPS
|
||||
config.cookie_life_time=Sīkdatņu glabāšanas ilgums
|
||||
config.picture_config=Attēlu konfigurācija
|
||||
config.picture_service=Lokāli attēli
|
||||
config.disable_gravatar=Atspējot Gravatar
|
||||
config.log_config=Žurnalizēšanas konfigurācija
|
||||
config.log_mode=Žurnalizēšanas veids
|
||||
|
||||
monitor.cron=Cron uzdevumi
|
||||
monitor.name=Nosaukums
|
||||
monitor.schedule=Grafiks
|
||||
monitor.next=Nākošās izpildes laiks
|
||||
monitor.previous=Pēdējās izpildes laiks
|
||||
monitor.execute_times=Izpilžu skaits
|
||||
monitor.process=Darbojošies procesi
|
||||
monitor.desc=Apraksts
|
||||
monitor.start=Sākuma laiks
|
||||
monitor.execute_time=Izpildes laiks
|
||||
|
||||
notices.system_notice_list=Sistēmas paziņojumi
|
||||
notices.type=Veids
|
||||
notices.type_1=Repozitorijs
|
||||
notices.desc=Apraksts
|
||||
notices.op=Op.
|
||||
notices.delete_success=Sistēmas paziņojums tika veiksmīgi izdzēsts.
|
||||
|
||||
[action]
|
||||
create_repo=izveidoja repozitoriju <a href="%s/%s">%s</a>
|
||||
commit_repo=veica izmaiņu nosūtīšanu atzaram <a href="%s/%s/src/%s">%s</a> repozitorijā <a href="%s/%s">%s</a>
|
||||
create_issue=reģistrēja problēmu <a href="%s/%s/issues/%s">%s#%s</a>
|
||||
comment_issue=pievienoja komentāru problēmai <a href="%s/%s/issues/%s">%s#%s</a>
|
||||
transfer_repo=mainīja repozitorija <code>%s</code> īpašnieku uz <a href="/%s%s">%s</a>
|
||||
push_tag=pievienoja birku <a href="%s/%s/src/%s">%s</a> repozitorijam <a href="%s/%s">%s</a>
|
||||
compare_2_commits=Veikt salīdzināšanu starp šīm 2 revīzijām
|
||||
|
||||
[tool]
|
||||
ago=atpakaļ
|
||||
from_now=no šī brīža
|
||||
now=tagad
|
||||
1s=1 sekundi %s
|
||||
1m=1 minūti %s
|
||||
1h=1 stundu %s
|
||||
1d=1 dienu %s
|
||||
1w=1 nedēļu %s
|
||||
1mon=1 mēnesi %s
|
||||
1y=1 gadu %s
|
||||
seconds=%d sekundes %s
|
||||
minutes=%d minūtes %s
|
||||
hours=%d stundas %s
|
||||
days=%d dienas %s
|
||||
weeks=%d nedēļas %s
|
||||
months=%d mēneši %s
|
||||
years=%d gadi %s
|
||||
raw_seconds=sekundes
|
||||
raw_minutes=minūtes
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
718
conf/locale/locale_nl-NL.ini
Executable file
718
conf/locale/locale_nl-NL.ini
Executable file
@@ -0,0 +1,718 @@
|
||||
app_desc=Een pijnloze self-hosted Git-dienst geschreven in Go
|
||||
|
||||
home=Huis
|
||||
dashboard=Dashboard
|
||||
explore=Verkennen
|
||||
help=Help
|
||||
sign_in=Inloggen
|
||||
social_sign_in=Social netwerk inlog: tweede stap <small>account koppelen</small>
|
||||
sign_out=Afmelden
|
||||
sign_up=Aanmelden
|
||||
register=Registreer
|
||||
website=Website
|
||||
version=Versie
|
||||
page=Pagina
|
||||
template=Sjabloon
|
||||
language=Taal
|
||||
|
||||
username=Gebruikersnaam
|
||||
email=E-mail
|
||||
password=Wachttwoord
|
||||
re_type=Verificatie
|
||||
captcha=CAPTCHA
|
||||
|
||||
repository=Repositorie
|
||||
organization=Organisatie
|
||||
mirror=Spiegel
|
||||
new_repo=Nieuwe repositorie
|
||||
new_migrate=Nieuwe migratie
|
||||
new_fork=Nieuwe vork Repository
|
||||
new_org=Nieuwe organisatie
|
||||
manage_org=Beheer organisaties
|
||||
admin_panel=Adminpaneel
|
||||
account_settings=Accountinstellingen
|
||||
settings=Instellingen
|
||||
|
||||
news_feed=Nieuwsfeed
|
||||
pull_requests=Pull-aanvragen
|
||||
issues=Kwesties
|
||||
|
||||
cancel=Annuleer
|
||||
|
||||
[install]
|
||||
install=Installatie
|
||||
title=Installatiestappen voor de eerste keer opstarten
|
||||
requite_db_desc=Om Gogs te gebruiken is MySQL, PostgreSQL of SQLite3 vereist (SQLite3 is beschikbaar in de officiële versie).
|
||||
db_type=Database-type
|
||||
host=Host
|
||||
user=Gebruikersnaam
|
||||
password=Wachtwoord
|
||||
db_name=Database naam
|
||||
db_helper=Gebruik InnoDB engine met utf8_general_ci karakterset voor MySQL.
|
||||
ssl_mode=SSL-modus
|
||||
path=Pad
|
||||
sqlite_helper=Het pad naar de SQLite3 database.
|
||||
general_title=Algemene instellingen van Gogs
|
||||
repo_path=Repositories basis directorie
|
||||
repo_path_helper=Alle remote Git repositories worden in deze directorie opgeslagen
|
||||
run_user=Uitvoerende gebruikersnaam
|
||||
run_user_helper=Deze gebruiker moet toegang hebben tot de git repositorie directorie en moet Gogs kunnen starten
|
||||
domain=Domein
|
||||
domain_helper=Dit heeft invloed op de SSH kloon URLs
|
||||
app_url=Applicatie URL
|
||||
app_url_helper=Dit heeft invloed op de HTTP/HTTPS kloon urls en de urls die in de email worden gebruikt
|
||||
email_title=Email service instellingen (Optioneel)
|
||||
smtp_host=SMTP host
|
||||
mailer_user=Afzender e-mail / gebruikersnaam
|
||||
mailer_password=Wachtwoord
|
||||
notify_title=Notificatie-instelligen (optioneel)
|
||||
register_confirm=Activeer registratie emails
|
||||
mail_notify=Activeer e-mailnotificaties
|
||||
admin_title=Instellingen beheerdersaccount
|
||||
admin_name=Gebruikersnaam
|
||||
admin_password=Wachtwoord
|
||||
confirm_password=Verifieer wachtwoord
|
||||
admin_email=E-mailadres
|
||||
install_gogs=Installeer Gogs
|
||||
test_git_failed=Git test niet gelukt: 'git' commando %v
|
||||
sqlite3_not_available=Uw versie biedt geen ondersteuning voor SQLite3, download de officiële binaire versie van %s, niet de gobuild versie.
|
||||
invalid_db_setting=Uw database instellingen zijn niet correct: %v
|
||||
invalid_repo_path=Repositorie basis pad is niet correct: %v
|
||||
run_user_not_match=De uitvoerende gebruiker is niet de huidig gebruiker: %s -> %s
|
||||
save_config_failed=Kan de configuratie niet opslaan: %v
|
||||
invalid_admin_setting=Uw admin-instellingen zijn niet geldig: %v
|
||||
install_success=Welkom! Wij zijn veheugd dat u voor Gogs heeft gekozen, veel plezier en tot ziens
|
||||
|
||||
[home]
|
||||
uname_holder=Gebruikersnaam of e-mail
|
||||
password_holder=Wachtwoord
|
||||
switch_dashboard_context=Wissel voorpaginacontext
|
||||
my_repos=Mijn repositories
|
||||
collaborative_repos=Gedeelde repositories
|
||||
my_orgs=Mijn organisaties
|
||||
my_mirrors=Mijn mirrors
|
||||
|
||||
[explore]
|
||||
repos=Repositories
|
||||
|
||||
[auth]
|
||||
create_new_account=Maak nieuw account aan
|
||||
register_hepler_msg=Heeft u al een account? Meld u nu aan!
|
||||
social_register_hepler_msg=Heeft u al een account? Koppel nu!
|
||||
disable_register_prompt=Sorry, registratie is uitgeschakeld. Neem contact op met de beheerder van deze site.
|
||||
disable_register_mail=Sorry, bevestiging van registratie per e-mail is uitgeschakeld.
|
||||
remember_me=Onthoud mij
|
||||
forgot_password=Wachtwoord vergeten
|
||||
forget_password=Wachtwoord vergeten?
|
||||
sign_up_now=Een account nodig? Meld u nu aan.
|
||||
confirmation_mail_sent_prompt=Een bevestigingsemail is gestuurd naar <b>%s</b>, Bevestig u aanvraag binnen %d uren om uw registratie te voltooien.
|
||||
sign_in_email=Meld u aan met uw e-mailadres
|
||||
active_your_account=Activeer uw account
|
||||
resent_limit_prompt=Sorry, u heeft te snel na elkaar een aanvraag gedaan voor een activatie mail. Wacht drie minuten voor uw volgende aanvraag.
|
||||
has_unconfirmed_mail=Beste %s, u heeft een onbevestigde e-mailadres (<b>%s</b>). Als u nog geen bevestiging per e-mail heeft ontvangen, of u een nieuwe aanvraag wilt doen, klik dan op de onderstaande knop.
|
||||
resend_mail=Klik hier om uw activatie mail nog een keer te verzenden
|
||||
email_not_associate=Dit e-mailadres is niet gekoppeld aan een account.
|
||||
send_reset_mail=Klik hier om uw wachtwoord reset mail (nogmaals) te versturen
|
||||
reset_password=Reset uw wachtwoord
|
||||
invalid_code=Sorry, uw bevestigingscode is verlopen of niet meer geldig.
|
||||
reset_password_helper=Klik hier om uw wachtwoord opnieuw in te stellen.
|
||||
password_too_short=De lengte van uw wachtwoord moet minimaal zes karakters zijn.
|
||||
|
||||
[form]
|
||||
UserName=Gebruikersnaam
|
||||
RepoName=Repositorie naam
|
||||
Email=e-mailadres
|
||||
Password=Wachtwoord
|
||||
Retype=Verifieer wachtwoord
|
||||
SSHTitle=SSH sleutel naam
|
||||
HttpsUrl=HTTPS-URL
|
||||
PayloadUrl=Nettolading URL
|
||||
TeamName=Team naam
|
||||
AuthName=Autorisatienaam
|
||||
AdminEmail=E-mail beheerder
|
||||
|
||||
require_error=kan niet leeg zijn.
|
||||
alpha_dash_error=moet een valide alfanumeriek of dash(-_) karakter zijn.
|
||||
alpha_dash_dot_error=moet een valide alfanumeriek, dash(-_) of (.) punt karakter zijn.
|
||||
min_size_error=moet minimaal %s karakters bevatten.
|
||||
max_size_error=mag maximaal %s karakters bevatten.
|
||||
email_error=is niet een valide e-mail adres.
|
||||
url_error=is niet een valide URL.
|
||||
unknown_error=Onbekende fout:
|
||||
captcha_incorrect=Captcha komt niet overeen.
|
||||
password_not_match=Wachtwoord en verificatie wachtwoord komen niet overeen.
|
||||
|
||||
username_been_taken=Gebruikersnaam is al in gebruik.
|
||||
repo_name_been_taken=Repositorie naam is al in gebruik.
|
||||
org_name_been_taken=Organisatie naam is al in gebruik.
|
||||
team_name_been_taken=Team naam is al in gebruik.
|
||||
email_been_used=e-mailadres is al in gebruik.
|
||||
ssh_key_been_used=Openbare sleutel naam is al in gebruik.
|
||||
illegal_username=Gebruikersnaam bevat illegale karakters.
|
||||
illegal_repo_name=Repositorie naam bevat illegale karakters.
|
||||
illegal_org_name=Organisatie naam bevat illegale karakters.
|
||||
illegal_team_name=Team naam bevat illegale karakters.
|
||||
username_password_incorrect=Gebruikersnaam of wachtwoord is niet correct.
|
||||
enterred_invalid_repo_name=U heeft een onjuiste repositorie naam ingevoerd.
|
||||
enterred_invalid_owner_name=U heeft een onjuiste eigenaar ingevoerd.
|
||||
enterred_invalid_password=U heeft een onjuiste wachtwoord ingevoerd.
|
||||
user_not_exist=Gegeven gebruiker bestaat niet.
|
||||
last_org_owner=De gebruiker die u probeert te verwijderen is het enige lid (eigenaar) van dit team. U moet eerst nieuwe lid (eigenaar) aanstellen.
|
||||
|
||||
invalid_ssh_key=Sorry, we zijn niet in staat om uw SSH-sleutel te verifiëren: %s
|
||||
unable_verify_ssh_key=Gogs kan niet controleren of uw SSH-sleutel, maar wij gaan ervan uit dat is geldig, zorg ervoor dat uzelf.
|
||||
auth_failed=Verificatie mislukt: %v
|
||||
|
||||
still_own_repo=Uw account heeft nog een eigendom op een repositorie. U moet deze eerst verwijderen of overdragen.
|
||||
still_has_org=Uw account nog steeds lidmaatschap van organisatie, u hebt naar links of hen eerst verwijderen.
|
||||
org_still_own_repo=De organisatie heeft nog eigendomen op repositories. U moet deze eerst verwijderen of overdragen.
|
||||
|
||||
still_own_user=Deze authenticatie methode wordt nog gebruikt door sommige gebruikers. U moet hen eerst verplaatsen of verwijderen.
|
||||
|
||||
target_branch_not_exist=Doel branch bestaat niet
|
||||
|
||||
[user]
|
||||
change_avatar=Verander uw avatar op Gravatar.com
|
||||
change_custom_avatar=Change your avatar in settings
|
||||
join_on=Aangemeld op
|
||||
repositories=repositories
|
||||
activity=Openbare activiteit
|
||||
followers=Volgers
|
||||
starred=Sterren
|
||||
following=Volgt
|
||||
|
||||
[settings]
|
||||
profile=Profiel
|
||||
password=Wachtwoord
|
||||
ssh_keys=SSH-sleutels
|
||||
social=Sociale netwerk-accounts
|
||||
applications=Toepassingen
|
||||
orgs=Organisaties
|
||||
delete=Verwijder account
|
||||
uid=uid
|
||||
|
||||
public_profile=Openbaar profiel
|
||||
profile_desc=Uw e-mailadres is openbaar zichtbaar en zal gebruikt worden gebruikt voor alle account gerlateerde berichtgevingen en web bewerking gemaakt via de website.
|
||||
full_name=Volledige naam
|
||||
website=Website
|
||||
location=Locatie
|
||||
update_profile=Profile bijwerken
|
||||
update_profile_success=Uw profiel is succesvol bijgewerkt.
|
||||
change_username=Username veranderd
|
||||
change_username_desc=Gebruikersnaam is gewijzigd. Wilt u doorgaan? Dit zal gevolgen hebben voor alle koppelingen die betrekking hebben op uw account.
|
||||
continue=Doorgaan
|
||||
cancel=Annuleren
|
||||
|
||||
enable_custom_avatar=Enable Custom Avatar
|
||||
enable_custom_avatar_helper=Enable this to disable fetch from Gravatar
|
||||
choose_new_avatar=Choose new avatar
|
||||
update_avatar=Update Avatar Setting
|
||||
uploaded_avatar_not_a_image=Uploaded file is not a image.
|
||||
no_custom_avatar_available=No custom avatar available, cannot enable it.
|
||||
update_avatar_success=Your avatar setting has been updated successfully.
|
||||
|
||||
change_password=Verander wachtwoord
|
||||
old_password=Huidige wachtwoord
|
||||
new_password=Nieuw wachtwoord
|
||||
password_incorrect=Huidig wachtwoord is niet correct.
|
||||
change_password_success=Wachtwoord is succesvol gewijzigd. U kunt nu met uw nieuwe wachtwoord inloggen.
|
||||
|
||||
manage_ssh_keys=Beheer SSH sleutels
|
||||
add_key=Sleutel toevoegen
|
||||
ssh_desc=Dit is een lijst van alle SSH sleutels die gekoppeld zijn aan uw account. Verwijder alle sleutels die u niet herkent.
|
||||
ssh_helper=<strong>De behoeftehulp van?</strong> Check out onze gids voor het <a href="%s"> genereren van SSH sleutels</a> of <a href="%s"> algemene SSH</a> problemen.
|
||||
add_new_key=SSH sleutel toevoegen
|
||||
key_name=Sleutel naam
|
||||
key_content=Inhoud
|
||||
add_key_success=Nieuwe SSH sleutel is toegevoegd!
|
||||
delete_key=Verwijder
|
||||
add_on=Toegevoegd op
|
||||
last_used=Laatst gebruikt op
|
||||
no_activity=Geen recente activiteiten
|
||||
|
||||
manage_social=Beheer gekoppelde sociale accounts
|
||||
social_desc=Dit is een lijst van de bijbehorende sociale accounts koppelingen, Verwijder eventueel koppelingen die u niet herkent.
|
||||
unbind=Loskoppelen
|
||||
unbind_success=Sociaal account is ontkoppeld.
|
||||
|
||||
manage_access_token=Persoonlijke toegangstokens beheren
|
||||
generate_new_token=Nieuwe Token genereren
|
||||
tokens_desc=Tokens u hebt gegenereerd die kunnen worden gebruikt voor toegang tot de API Gogs.
|
||||
new_token_desc=Zoals voor nu, moet elke token zal hebben volledige toegang tot uw account.
|
||||
token_name=Symbolische naam
|
||||
generate_token=Token genereren
|
||||
generate_token_succees=Nieuwe toegangstoken is met succes gegenereerd! Zorg ervoor dat uw nieuwe persoonlijke toegangstoken nu kopiëren. U zal niet zitten kundig voor zien het weer!
|
||||
delete_token=Verwijderen
|
||||
delete_token_success=Persoonlijke toegangstoken is met succes verwijderd! Vergeet niet uw toepassingen ook wilt bijwerken.
|
||||
|
||||
delete_account=Verwijder uw account
|
||||
delete_prompt=Deze handeling zal uw account definitief verwijderen, u kunt dit <strong> NIET </strong> terug draaien!
|
||||
confirm_delete_account=Bevestig verwijdering
|
||||
delete_account_title=Account verwijderen
|
||||
delete_account_desc=Dit account zal permanent worden verwijderd. Wilt u doorgaan?
|
||||
|
||||
[repo]
|
||||
owner=Eigenaar
|
||||
repo_name=Repositorie naam
|
||||
repo_name_helper=Een goede repositorie naam is kort, memorabel en <strong>uniek</strong>.
|
||||
visibility=Zichtbaarheid
|
||||
visiblity_helper=Deze repositorie is <span class="label label-red label-radius">prive</span>
|
||||
fork_repo=Vork Repository
|
||||
fork_from=Afsplitsing van
|
||||
fork_visiblity_helper=Gevorkte repository wijzigen zijn bereik potentiële kopers niet
|
||||
repo_desc=Omschrijving
|
||||
repo_lang=Taal
|
||||
repo_lang_helper=Selecteer een .gitignore bestand
|
||||
license=Licentie
|
||||
license_helper=Selecteer een licentie bestand
|
||||
init_readme=Initialiseer deze repositorie met een README.md
|
||||
create_repo=Nieuwe Repositorie
|
||||
default_branch=Standaard branch
|
||||
mirror_interval=Mirror interval(uur)
|
||||
goget_meta=Go-Get Meta
|
||||
goget_meta_helper=Deze repositorie is nu beschikbaar voor <span class="label label-blue label-radius">Go-Get</span>
|
||||
|
||||
need_auth=Autorisatie vereist
|
||||
migrate_type=Migratie type
|
||||
migrate_type_helper=Deze repositorie zal een <span class="label label-blue label-radius">mirror</span> worden
|
||||
migrate_repo=Migreer repositorie
|
||||
|
||||
copy_link=Kopieer
|
||||
click_to_copy=Kopieer link naar plakbord
|
||||
copied=Gekopieerd
|
||||
clone_helper=De behoeftehulp van klonen? Bezoek <a target="_blank" href="%s"> helpen</a>!
|
||||
unwatch=Negeren
|
||||
watch=Volgen
|
||||
unstar=Ontster
|
||||
star=Ster
|
||||
fork=Vork
|
||||
|
||||
no_desc=Geen omschrijving
|
||||
quick_guide=Snelstart gids
|
||||
clone_this_repo=Kloon deze repositorie
|
||||
create_new_repo_command=Maak een nieuwe repositorie aan vanaf de console
|
||||
push_exist_repo=Push een bestaande repositorie vanaf de console
|
||||
|
||||
branch=Aftakking
|
||||
tree=Boom
|
||||
branch_and_tags=Aftakkingen & labels
|
||||
branches=Aftakkingen
|
||||
tags=Labels
|
||||
issues=Kwesties
|
||||
commits=Commits
|
||||
releases=Publicaties
|
||||
file_raw=Ruwe
|
||||
file_history=Geschiedenis
|
||||
file_view_raw=Weergave ruwe
|
||||
|
||||
commits.commits=Commits
|
||||
commits.search=Zoeken
|
||||
commits.find=zoek
|
||||
commits.author=Auteur
|
||||
commits.message=Bericht
|
||||
commits.date=Datum
|
||||
commits.older=Ouder
|
||||
commits.newer=Nieuwer
|
||||
|
||||
settings=Instellingen
|
||||
settings.options=Opties
|
||||
settings.collaboration=Samenwerking
|
||||
settings.hooks=Webhooks
|
||||
settings.githooks=Git haken
|
||||
settings.deploy_keys=Installeer sleutels
|
||||
settings.basic_settings=Basis instellingen
|
||||
settings.danger_zone=Gevaren zone
|
||||
settings.site=Officiële site
|
||||
settings.update_settings=Instellingen bewerken
|
||||
settings.change_reponame=Repositorienaam aangepast
|
||||
settings.change_reponame_desc=De repositorienaam is veranderd. Wilt u doorgaan? Dit zal gevolgen hebben voor alle koppelingen die betrekking hebben op deze repositorie.
|
||||
settings.transfer=Eigendom overdragen
|
||||
settings.transfer_desc=Draag deze repo over aan een andere gebruiker of een organisatie waar u beheerders rechten heeft.
|
||||
settings.new_owner_has_same_repo=De nieuwe eigenaar heeft al een repositorie met deze naam
|
||||
settings.delete=Verwijder deze repositorie
|
||||
settings.delete_desc=Als u eenmaal een repositorie verwijderd is er geen weg terug. Gelieve zeker te zijn van uw acties.
|
||||
settings.transfer_notices=<p> - U kan uw toegang verliezen als de nieuwe eigenaar een individuele gebruiker is</p> <p> - . . U zal uw toegang behouden als de nieuwe eigenaar een organisatie is en u één van de eigenaren bent</p>
|
||||
settings.update_settings_success=Repositorie instellingen zijn succesvol bijgewerkt.
|
||||
settings.transfer_owner=Nieuwe eigenaar
|
||||
settings.make_transfer=Maak overdracht
|
||||
settings.transfer_succeed=Eigendom repositorie succesvol overgedragen
|
||||
settings.confirm_delete=Bevestig verwijdering
|
||||
settings.add_collaborator=Nieuwe medewerker toevoegen
|
||||
settings.add_collaborator_success=medewerker is toegevoegd.
|
||||
settings.remove_collaborator_success=medewerker is verwijderd.
|
||||
settings.user_is_org_member=Gebruiker is lid van de organisatie die als een medewerker kan niet worden toegevoegd.
|
||||
settings.add_webhook=Webhook toevoegen
|
||||
settings.hooks_desc=Webhooks dat de externe diensten om kennisgevingen te ontvangen wanneer bepaalde gebeurtenissen op Gogs plaatsvinden. Wanneer de opgegeven gebeurtenissen plaatsvinden, sturen we een POST-aanvraag naar elk van de URL's die u opgeeft. Meer informatie vindt u in onze <a target="_blank" href="%s"> Webhooks gids</a>.
|
||||
settings.githooks_desc=Git haken worden aangedreven door Git zelf, u kunt bestanden van ondersteunde haken in de lijst hieronder om aangepaste acties van toepassing bewerken.
|
||||
settings.githook_edit_desc=Als haak niet actief is, zal monster inhoud worden gepresenteerd. Verlof inhoud leeg zal deze haak uitschakelen.
|
||||
settings.githook_name=Haak naam
|
||||
settings.githook_content=Haak inhoud
|
||||
settings.update_githook=Haak bijwerken
|
||||
settings.remove_hook_success=Webhook is verwijderd.
|
||||
settings.add_webhook_desc=We sturen een <code>POST</code>-aanvraag naar de onderstaande URL met details voor alle geplaatste gebeurtenissen. U kunt ook opgeven welke gegevensindeling u wenst te ontvangen (JSON, <code>x-1-800-www-Dell-vorm-urlencoded</code>, <em>enz</em>.). Meer informatie kan gevonden worden in <a target="_blank" href="%s"> Webhooks gids</a>.
|
||||
settings.payload_url=Nettolading URL
|
||||
settings.content_type=Content type
|
||||
settings.secret=Geheim
|
||||
settings.event_desc=Bij welke gebeurtenissen wilt u dat deze webhook getriggerd wordt?
|
||||
settings.event_push_only=Alleen bij de <code>push</code> event.
|
||||
settings.active=Actief
|
||||
settings.active_helper=We zullen details van de gebeurtenissen af leveren wanneer deze webhook wordt geactiveerd.
|
||||
settings.add_hook_success=Nieuwe webhook toegevoegd.
|
||||
settings.update_webhook=Bewerk webhook
|
||||
settings.update_hook_success=Webhook is bijgewerkt.
|
||||
settings.delete_webhook=Webhook verwijderen
|
||||
settings.recent_deliveries=Recente bezorgingen
|
||||
settings.hook_type=Type hook
|
||||
settings.add_slack_hook_desc=<a href="%s"> toegestane vertraging</a> integratie toevoegen aan uw repository.
|
||||
settings.slack_token=Slack token
|
||||
settings.slack_domain=Slack domein
|
||||
settings.slack_channel=Slack kanaal
|
||||
|
||||
diff.browse_source=Bladeren bron
|
||||
diff.parent=bovenliggende
|
||||
diff.commit=commit
|
||||
diff.data_not_available=Diff gegevens niet beschikbaar.
|
||||
diff.show_diff_stats=Toon Diff Stats
|
||||
diff.stats_desc=<strong>%d gewijzigde bestanden</strong> met <strong>toevoegingen van %d</strong> en <strong>%d verwijderingen</strong>
|
||||
diff.bin=BIN
|
||||
diff.view_file=Bestand weergeven
|
||||
|
||||
release.releases=Releases
|
||||
release.new_release=New Release
|
||||
release.draft=Draft
|
||||
release.prerelease=Pre-Release
|
||||
release.stable=Stable
|
||||
release.edit=edit
|
||||
release.ahead=<strong>%d</strong> commits to %s since this release
|
||||
release.source_code=Source Code
|
||||
release.tag_name=Tag name
|
||||
release.target=Target
|
||||
release.tag_helper=Choose an existing tag, or create a new tag on publish.
|
||||
release.release_title=Release title
|
||||
release.content_with_md=Content with <a href="%s">Markdown</a>
|
||||
release.write=Write
|
||||
release.preview=Preview
|
||||
release.content_placeholder=Write some content
|
||||
release.loading=Loading...
|
||||
release.prerelease_desc=This is a pre-release
|
||||
release.prerelease_helper=We’ll point out that this release is identified as non-production ready.
|
||||
release.publish=Publish Release
|
||||
release.save_draft=Save Draft
|
||||
release.edit_release=Edit Release
|
||||
release.tag_name_already_exist=Release with this tag name has already existed.
|
||||
|
||||
[org]
|
||||
org_name_holder=Organisatienaam
|
||||
org_name_helper=Een goede organisatienaam is kort en memorabel.
|
||||
org_email_helper=Alle notificaties en bevestigingen worden op het e-mailadres van de organisatie ontvangen.
|
||||
create_org=Nieuwe organisatie aanmaken
|
||||
repo_updated=Geupdate
|
||||
people=Mensen
|
||||
invite_someone=Iemand uitnodigen
|
||||
teams=Teams
|
||||
lower_members=leden
|
||||
lower_repositories=repositories
|
||||
create_new_team=Nieuw team aanmaken
|
||||
org_desc=Omschrijving
|
||||
team_name=Teamnaam
|
||||
team_desc=Omschrijving
|
||||
team_name_helper=U gebruikt deze naam om dit team te vermelden in conversaties.
|
||||
team_desc_helper=Waar gaat dit team doen?
|
||||
team_permission_desc=Welke privileges zou dit team moeten hebben?
|
||||
|
||||
settings=Instellingen
|
||||
settings.options=Opties
|
||||
settings.full_name=Volledige naam
|
||||
settings.website=Website
|
||||
settings.location=Locatie
|
||||
settings.update_settings=Instellingen bijwerken
|
||||
settings.change_orgname=Organisatie naam veranderd
|
||||
settings.change_orgname_desc=De naam van de organisatie is veranderd, wilt u doorgaan? Dit zal gevolgen hebben voor alle koppelingen die betrekking hebben op deze organisatie.
|
||||
settings.update_setting_success=Organisatie instellingen zijn succesvol bijgewerkt.
|
||||
settings.delete=Verwijder organisatie
|
||||
settings.delete_account=Verwijder deze organisatie
|
||||
settings.delete_prompt=Deze actie zal de origanisatie permanent verwijderen. U kunt dit <strong>NIET</strong> terug draaien!
|
||||
settings.confirm_delete_account=Bevestig verwijdering
|
||||
settings.delete_org_title=Verwijderen organsiatie
|
||||
settings.delete_org_desc=Deze organisatie zal permanent worden verwijderd, wilt u doorgaan?
|
||||
settings.hooks_desc=Een webhook toevoegen die door <strong>alle repositories</strong> in deze organisatie getriggerd kan worden.
|
||||
|
||||
members.public=Openbaar
|
||||
members.public_helper=maak prive
|
||||
members.private=Prive
|
||||
members.private_helper=maak openbaar
|
||||
members.owner=Eigenaar
|
||||
members.member=Lid
|
||||
members.conceal=Verbergen
|
||||
members.remove=Verwijderen
|
||||
members.leave=Verlaat
|
||||
members.invite_desc=Begin met het typen van een gebruikersnaam om een nieuw lid aan %s uit te nodigen:
|
||||
members.invite_now=Nu uitnodigen
|
||||
|
||||
teams.join=Lid worden
|
||||
teams.leave=Vertlaat
|
||||
teams.read_access=Leestoegang
|
||||
teams.read_access_helper=Dit team is in staat om zijn repositories te bekijken en te klonen.
|
||||
teams.write_access=Schrijf toegang
|
||||
teams.write_access_helper=Dit team is in staat om zijn repositories te bekijken en push aanvragen te verwerken.
|
||||
teams.admin_access=Beheerder toegang
|
||||
teams.admin_access_helper=Dit team is in staat om push & pull aanvragen te verwerken en om nieuwe medewerkers toe te voegen.
|
||||
teams.no_desc=Dit team heeft geen omschrijving
|
||||
teams.settings=Instellingen
|
||||
teams.owners_permission_desc=Eigenaren hebben volledige toegang tot <strong>alle repositories</strong> en hebben <strong>beheerder rechten</strong> over de organisatie.
|
||||
teams.members=Team leden
|
||||
teams.update_settings=Instellingen bijwerken
|
||||
teams.delete_team=Verwijder deze team
|
||||
teams.add_team_member=Nieuwe team lid aanmaken
|
||||
teams.delete_team_title=Team verwijderen
|
||||
teams.delete_team_desc=Dit team zal worden verwijderd. De leden van dit team zullen toegang tot alle repositories van het team verliezen. Wilt u doorgaan?
|
||||
teams.delete_team_success=Gekozen team is succesvol verwijderd.
|
||||
teams.read_permission_desc=Dit team heeft <strong>Lees</strong> rechten : leden kunnen repositories lezen en klonen.
|
||||
teams.write_permission_desc=Dit team heeft <strong>Schrijf</strong> rechten : leden kunnen repositories lezen en push aanvragen verwerken.
|
||||
teams.admin_permission_desc=Dit team heeft <strong>Beheerders</strong> rechten : leden kunnen repositories lezen en push aanvragen verwerken en medewerkers toevoegen.
|
||||
teams.repositories=Teamrepositories
|
||||
teams.add_team_repository=Nieuwe teamrepositorie aanmaken
|
||||
teams.remove_repo=Verwijder
|
||||
teams.add_nonexistent_repo=De opslagplaats die u probeert toe te voegen niet bestaat, kunt u het eerst aanmaken.
|
||||
|
||||
[admin]
|
||||
dashboard=Dashboard
|
||||
users=Gebruikers
|
||||
organizations=Orgranisaties
|
||||
repositories=Repositories
|
||||
authentication=Autenticaties
|
||||
config=Configuratie
|
||||
notices=Systeem aankondigingen
|
||||
monitor=Bijhouden
|
||||
prev=Vorige
|
||||
next=Volgende
|
||||
|
||||
dashboard.statistic=Statistieken
|
||||
dashboard.operations=Bewerkingen
|
||||
dashboard.system_status=Status Systeemmonitor
|
||||
dashboard.statistic_info=Gogs database heeft <b>%d</b> gebruikers, <b>%d</b> organisaties, <b>%d</b> openbare sleutels, <b>%d</b> repositories, <b>%d</b> volgers, <b>%d</b> sterren, <b>%d</b> acties, <b>%d</b> participanten, <b>%d</b> issues, <b>%d</b> reacties, <b>%d</b> sociale accounten, <b>%d</b> volgers, <b>%d</b> mirrors, <b>%d</b> publicaties, <b>%d</b> login bronnen, <b>%d</b> webhooks, <b>%d</b> mijlpalen, <b>%d</b> labels, <b>%d</b> hook taken, <b>%d</b> teams, <b>%d</b> bijgewerkte taken, <b>%d</b> bijlagen.
|
||||
dashboard.operation_name=Bewerking naam
|
||||
dashboard.operation_switch=Omschakelen
|
||||
dashboard.operation_run=Uitvoeren
|
||||
dashboard.clean_unbind_oauth=Clean unbound OAuths
|
||||
dashboard.clean_unbind_oauth_success=Alle OAuthes binding hebben verwijderd.
|
||||
dashboard.delete_inactivate_accounts=Verwijder alle inactieve accounts
|
||||
dashboard.delete_inactivate_accounts_success=Alle inactivering van rekeningen hebben verwijderd.
|
||||
dashboard.delete_repo_archives=Verwijderen van alle repositories archieven
|
||||
dashboard.delete_repo_archives_success=Alle repositories archieven hebben verwijderd.
|
||||
dashboard.git_gc_repos=Do garbage collection on repositories
|
||||
dashboard.git_gc_repos_success=All repositories have done garbage collection successfully.
|
||||
dashboard.server_uptime=Uptime server
|
||||
dashboard.current_goroutine=Huidige Goroutines
|
||||
dashboard.current_memory_usage=Huidige geheugen gebruik
|
||||
dashboard.total_memory_allocated=Totaal toegewezen geheugen
|
||||
dashboard.memory_obtained=Geheugen gebruikt
|
||||
dashboard.pointer_lookup_times=Aanwijzer Lookup keer
|
||||
dashboard.memory_allocate_times=Geheugen toewijzen keer
|
||||
dashboard.memory_free_times=Geheugen gratis keer
|
||||
dashboard.current_heap_usage=Huidige Heap gebruik
|
||||
dashboard.heap_memory_obtained=Heap-geheugen verkregen
|
||||
dashboard.heap_memory_idle=Heap Memory inactief
|
||||
dashboard.heap_memory_in_use=Hoop geheugen In gebruik
|
||||
dashboard.heap_memory_released=Heap-geheugen vrijgegeven
|
||||
dashboard.heap_objects=Heap-objecten
|
||||
dashboard.bootstrap_stack_usage=Bootstrap Stack gebruik
|
||||
dashboard.stack_memory_obtained=Stapel geheugen verkregen
|
||||
dashboard.mspan_structures_usage=MSpan structuren gebruik
|
||||
dashboard.mspan_structures_obtained=MSpan structuren verkregen
|
||||
dashboard.mcache_structures_usage=MCache structuren gebruik
|
||||
dashboard.mcache_structures_obtained=MCache structuren verkregen
|
||||
dashboard.profiling_bucket_hash_table_obtained=Profilering emmer hashtabel verkregen
|
||||
dashboard.gc_metadata_obtained=GC Metadada verkregen
|
||||
dashboard.other_system_allocation_obtained=Andere systeem toewijzing verkregen
|
||||
dashboard.next_gc_recycle=Volgende GC recycle
|
||||
dashboard.last_gc_time=Sinds vorige GC verwerkingstijd
|
||||
dashboard.total_gc_time=Totaal GC verwerkingstijd
|
||||
dashboard.total_gc_pause=Totaal GC verwerkingstijd
|
||||
dashboard.last_gc_pause=Laatste GC verwerkingstijd
|
||||
dashboard.gc_times=GC verwerkingen
|
||||
|
||||
users.user_manage_panel=Gebruikers beheren
|
||||
users.new_account=Nieuw account aanmaken
|
||||
users.name=Naam
|
||||
users.activated=Geactiveerd
|
||||
users.admin=Admin
|
||||
users.repos=Repos
|
||||
users.created=Aangemaakt
|
||||
users.edit=Bewerken
|
||||
users.auth_source=Autorisatiebron
|
||||
users.local=Lokaal
|
||||
users.auth_login_name=Autorisatie inlognaam
|
||||
users.update_profile_success=Profiel is succesvol bijgewerkt.
|
||||
users.edit_account=Bewerk account
|
||||
users.is_activated=Dit account is geactiveerd
|
||||
users.is_admin=Dit account heeft beheerdersrechten
|
||||
users.allow_git_hook=Deze account beschikt over machtigingen voor het maken van Git haken
|
||||
users.update_profile=Account profiel bijwerken
|
||||
users.delete_account=Dit account verwijderen
|
||||
users.still_own_repo=Dit account is nog steeds eigendom van een repositorie. U moet deze repositorie eerst verwijderen of overdragen.
|
||||
users.still_has_org=Deze account nog steeds lidmaatschap van organisatie, u hebt naar links of hen eerst verwijderen.
|
||||
|
||||
orgs.org_manage_panel=Organisaties beheren
|
||||
orgs.name=Naam
|
||||
orgs.teams=Teams
|
||||
orgs.members=Leden
|
||||
|
||||
repos.repo_manage_panel=Repositoriebeheerpaneel
|
||||
repos.owner=Eigenaar
|
||||
repos.name=Naam
|
||||
repos.private=Prive
|
||||
repos.watches=Volgers
|
||||
repos.stars=Sterren
|
||||
repos.issues=Kwesties
|
||||
|
||||
auths.auth_manage_panel=Autorisatiebeheerpaneel
|
||||
auths.new=Nieuwe autorisatiebron
|
||||
auths.name=Naam
|
||||
auths.type=Type
|
||||
auths.enabled=Ingeschakeld
|
||||
auths.updated=Bijgewerkt
|
||||
auths.auth_type=Autorisatietype
|
||||
auths.auth_name=Autorisatienaam
|
||||
auths.domain=Domein
|
||||
auths.host=Host
|
||||
auths.port=Poort
|
||||
auths.base_dn=Base DN
|
||||
auths.attributes=Zoek attributen
|
||||
auths.filter=Zoek filter
|
||||
auths.ms_ad_sa=MS Ad SA
|
||||
auths.smtp_auth=SMTP authenticatietype
|
||||
auths.smtphost=SMTP host
|
||||
auths.smtpport=SMTP poort
|
||||
auths.enable_tls=Activeer TLS-encryptie
|
||||
auths.enable_auto_register=Activeer automatische registratie
|
||||
auths.tips=Tips
|
||||
auths.edit=Bewerk autorisatie-instellingen
|
||||
auths.activated=Deze autorisatiemethode is geactiveerd
|
||||
auths.update_success=Autorisatie-instellingen zijn succesvol bijgewerkt.
|
||||
auths.update=Update autorisatie-instellingen
|
||||
auths.delete=Verwijder deze autorisatie
|
||||
auths.delete_auth_title=Verwijderings-autorisatie
|
||||
auths.delete_auth_desc=Deze autorisatiemethode wordt verwijderd. Weet u zeker dat u wilt doorgaan?
|
||||
|
||||
config.server_config=Serverconfiguratie
|
||||
config.app_name=Applicatienaam
|
||||
config.app_ver=Applicatieversie
|
||||
config.app_url=Applicatie-URL
|
||||
config.domain=Domein
|
||||
config.offline_mode=Offline-modus
|
||||
config.disable_router_log=Router-log uitschakelen
|
||||
config.run_user=Uitvoerende gebruiker
|
||||
config.run_mode=Uitvoer modus
|
||||
config.repo_root_path=Repositorie basis pad
|
||||
config.static_file_root_path=Statische bestanden basis pad
|
||||
config.log_file_root_path=Log bestand basis pad
|
||||
config.script_type=Script type
|
||||
config.reverse_auth_user=Omgekeerde verificatie gebruiker
|
||||
config.db_config=Databaseconfiguratie
|
||||
config.db_type=Type
|
||||
config.db_host=Host
|
||||
config.db_name=Naam
|
||||
config.db_user=Gebruiker
|
||||
config.db_ssl_mode=SSL modus
|
||||
config.db_ssl_mode_helper=(alleen voor "postgres")
|
||||
config.db_path=Pad
|
||||
config.db_path_helper=(alleen voor "sqlite3")
|
||||
config.service_config=Serviceconfiguratie
|
||||
config.register_email_confirm=E-mailbevestiging registreren
|
||||
config.disable_register=Registratie uitgeschakeld
|
||||
config.require_sign_in_view=Inloggen vereist om te kunnen inzien
|
||||
config.mail_notify=E-mailnotificaties
|
||||
config.enable_cache_avatar=Avatar Cache inschakelen
|
||||
config.active_code_lives=Actieve Code leven
|
||||
config.reset_password_code_lives=Reset wachtwoord Code leven
|
||||
config.webhook_config=Webhook configuratie
|
||||
config.task_interval=Taakinterval
|
||||
config.deliver_timeout=Bezorging verlooptijd
|
||||
config.mailer_config=Mailerconfiguatie
|
||||
config.mailer_enabled=Ingeschakeld
|
||||
config.mailer_name=Naam
|
||||
config.mailer_host=Host
|
||||
config.mailer_user=Gebruiker
|
||||
config.oauth_config=OAuth-configuratie
|
||||
config.oauth_enabled=Ingeschakeld
|
||||
config.cache_config=Cache-configuratie
|
||||
config.cache_adapter=Cache-adapter
|
||||
config.cache_interval=Cache-interval
|
||||
config.cache_conn=Cache-connectie
|
||||
config.session_config=Sessieconfiguratie
|
||||
config.session_provider=Sessieprovider
|
||||
config.provider_config=Provider config
|
||||
config.cookie_name=Cookie naam
|
||||
config.enable_set_cookie=Set Cookie inschakelen
|
||||
config.gc_interval_time=GC interval time
|
||||
config.session_life_time=Sessie duur
|
||||
config.https_only=Alleen HTTPS
|
||||
config.cookie_life_time=Cookie duur leeftijd
|
||||
config.picture_config=Foto configuratie
|
||||
config.picture_service=Foto service
|
||||
config.disable_gravatar=Gravatar uitschakelen
|
||||
config.log_config=Logconfiguratie
|
||||
config.log_mode=Log-modus
|
||||
|
||||
monitor.cron=Cron-taken
|
||||
monitor.name=Naam
|
||||
monitor.schedule=Planning
|
||||
monitor.next=Volgende
|
||||
monitor.previous=Vorige
|
||||
monitor.execute_times=Aantal keren uitgevoerd
|
||||
monitor.process=Draaiende processen
|
||||
monitor.desc=Omschrijving
|
||||
monitor.start=Starttijd
|
||||
monitor.execute_time=Uitvoertijd
|
||||
|
||||
notices.system_notice_list=Systeem aankondigingen
|
||||
notices.type=Type
|
||||
notices.type_1=Opslagplaats
|
||||
notices.desc=Beschrijving
|
||||
notices.op=Op.
|
||||
notices.delete_success=Systeem bericht is met succes verwijderd.
|
||||
|
||||
[action]
|
||||
create_repo=repositorie aangemaakt in <a href="%s/%s">%s</a>
|
||||
commit_repo=push update naar <a href="%s/%s/src/%s">%s</a> in <a href="%s/%s">%s</a
|
||||
create_issue=opende issue in <a href="%s/%s/issues/%s">%s#%s</a>
|
||||
comment_issue=reactie op issue <a href="%s/%s/issues/%s">%s#%s</a>
|
||||
transfer_repo=repositorie verplaatst naar <code>%s</code> naar <a href="/%s%s">%s</a>
|
||||
push_tag=geduwd label <a href="%s/%s/src/%s"> %s</a> naar <a href="%s/%s"> %s</a>
|
||||
compare_2_commits=Weergave vergelijking voor deze 2 commits
|
||||
|
||||
[tool]
|
||||
ago=geleden
|
||||
from_now=vanaf nu
|
||||
now=nu
|
||||
1s=1 seconde %s
|
||||
1m=1 minuut %s
|
||||
1h=1 uur %s
|
||||
1d=1 dag %s
|
||||
1w=1 week %s
|
||||
1mon=1 maand %s
|
||||
1y=1 jaar %s
|
||||
seconds=%d seconden %s
|
||||
minutes=%d minuten %s
|
||||
hours=%d uur %s
|
||||
days=%d dagen %s
|
||||
weeks=%d weken %s
|
||||
months=%d maanden %s
|
||||
years=%d jaren %s
|
||||
raw_seconds=seconden
|
||||
raw_minutes=minuten
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
718
conf/locale/locale_zh-CN.ini
Executable file
718
conf/locale/locale_zh-CN.ini
Executable file
@@ -0,0 +1,718 @@
|
||||
app_desc=基于 Go 语言的自助 Git 服务
|
||||
|
||||
home=首页
|
||||
dashboard=控制面板
|
||||
explore=探索
|
||||
help=帮助
|
||||
sign_in=登录
|
||||
social_sign_in=社交帐号登录:第 2 步 <small>关联帐号</small>
|
||||
sign_out=退出
|
||||
sign_up=注册
|
||||
register=注册
|
||||
website=官方网站
|
||||
version=当前版本
|
||||
page=页面
|
||||
template=模板
|
||||
language=语言选项
|
||||
|
||||
username=用户名
|
||||
email=邮箱
|
||||
password=密码
|
||||
re_type=确认密码
|
||||
captcha=验证码
|
||||
|
||||
repository=仓库
|
||||
organization=组织
|
||||
mirror=镜像
|
||||
new_repo=创建新的仓库
|
||||
new_migrate=迁移外部仓库
|
||||
new_fork=创建新的派生仓库
|
||||
new_org=创建新的组织
|
||||
manage_org=管理我的组织
|
||||
admin_panel=管理面板
|
||||
account_settings=帐户设置
|
||||
settings=帐户设置
|
||||
|
||||
news_feed=最新活动
|
||||
pull_requests=合并请求
|
||||
issues=工单管理
|
||||
|
||||
cancel=取消
|
||||
|
||||
[install]
|
||||
install=安装页面
|
||||
title=首次运行安装程序
|
||||
requite_db_desc=Gogs 允许后端数据库为 MySQL、PostgreSQL 或 SQLite3。
|
||||
db_type=数据库类型
|
||||
host=数据库主机
|
||||
user=数据库用户
|
||||
password=数据库用户密码
|
||||
db_name=数据库名称
|
||||
db_helper=如果您使用 MySQL,请使用 INNODB 引擎以及 utf8_general_ci 字符集。
|
||||
ssl_mode=SSL 模式
|
||||
path=数据库文件路径
|
||||
sqlite_helper=SQLite3 数据库的文件路径。
|
||||
general_title=应用基本设置
|
||||
repo_path=仓库根目录
|
||||
repo_path_helper=所有 Git 远程仓库都将被存放于该目录。
|
||||
run_user=运行系统用户
|
||||
run_user_helper=该用户必须具有对仓库根目录和运行 Gogs 的操作权限。
|
||||
domain=域名
|
||||
domain_helper=该设置影响 SSH 克隆地址。
|
||||
app_url=应用 URL
|
||||
app_url_helper=该设置影响 HTTP/HTTPS 克隆地址和一些邮箱中的链接。
|
||||
email_title=邮件服务设置(可选)
|
||||
smtp_host=SMTP 主机
|
||||
mailer_user=发送邮箱
|
||||
mailer_password=发送邮箱密码
|
||||
notify_title=通知提醒设置(可选)
|
||||
register_confirm=启用注册邮箱确认
|
||||
mail_notify=启用邮件通知提醒
|
||||
admin_title=管理员帐号设置
|
||||
admin_name=管理员用户名
|
||||
admin_password=管理员密码
|
||||
confirm_password=确认密码
|
||||
admin_email=管理员邮箱
|
||||
install_gogs=立即安装
|
||||
test_git_failed=无法识别 'git' 命令:%v
|
||||
sqlite3_not_available=您所使用的发行版不支持 SQLite3,请从 %s 下载官方构建版,而不是 gobuild 版本。
|
||||
invalid_db_setting=数据库设置不正确:%v
|
||||
invalid_repo_path=仓库根目录设置不正确:%v
|
||||
run_user_not_match=运行系统用户非当前用户:%s -> %s
|
||||
save_config_failed=应用配置保存失败:%v
|
||||
invalid_admin_setting=管理员帐户设置不正确:%v
|
||||
install_success=您好!我们很高兴您选择使用 Gogs,祝您使用愉快,代码从此无 BUG!
|
||||
|
||||
[home]
|
||||
uname_holder=用户名或邮箱
|
||||
password_holder=密码
|
||||
switch_dashboard_context=切换控制面板用户
|
||||
my_repos=我的仓库
|
||||
collaborative_repos=参与协作的仓库
|
||||
my_orgs=我的组织
|
||||
my_mirrors=我的镜像
|
||||
|
||||
[explore]
|
||||
repos=探索仓库
|
||||
|
||||
[auth]
|
||||
create_new_account=创建帐户
|
||||
register_hepler_msg=已经注册?立即登录!
|
||||
social_register_hepler_msg=已经注册?立即绑定!
|
||||
disable_register_prompt=对不起,注册功能已被关闭。请联系网站管理员。
|
||||
disable_register_mail=对不起,注册邮箱确认功能已被关闭。
|
||||
remember_me=记住登录
|
||||
forgot_password=忘记密码
|
||||
forget_password=忘记密码?
|
||||
sign_up_now=还没帐户?马上注册。
|
||||
confirmation_mail_sent_prompt=一封新的确认邮件已经被发送至 <b>%s</b>,请检查您的收件箱并在 %d 小时内完成确认注册操作。
|
||||
sign_in_email=登录到您的邮箱
|
||||
active_your_account=激活您的帐户
|
||||
resent_limit_prompt=对不起,您请求发送激活邮件过于频繁,请等待 3 分钟后再试!
|
||||
has_unconfirmed_mail=%s 您好,系统检测到您有一封发送至 <b>%s</b> 但未被确认的邮件。如果您未收到激活邮件,或需要重新发送,请单击下方的按钮。
|
||||
resend_mail=单击此处重新发送确认邮件
|
||||
email_not_associate=您输入的邮箱地址未被关联到任何帐号!
|
||||
send_reset_mail=单击此处(重新)发送您的密码重置邮件
|
||||
reset_password=重置密码
|
||||
invalid_code=对不起,您的确认代码已过期或已失效。
|
||||
reset_password_helper=单击此处重置密码
|
||||
password_too_short=密码长度不能少于 6 位!
|
||||
|
||||
[form]
|
||||
UserName=用户名
|
||||
RepoName=仓库名称
|
||||
Email=邮箱地址
|
||||
Password=密码
|
||||
Retype=确认密码
|
||||
SSHTitle=SSH 密钥名称
|
||||
HttpsUrl=HTTPS URL 地址
|
||||
PayloadUrl=推送地址
|
||||
TeamName=团队名称
|
||||
AuthName=认证名称
|
||||
AdminEmail=管理员邮箱
|
||||
|
||||
require_error=不能为空。
|
||||
alpha_dash_error=必须为英文字母、阿拉伯数字或横线(-_)。
|
||||
alpha_dash_dot_error=必须为英文字母、阿拉伯数字、横线(-_)或点。
|
||||
min_size_error=长度最小为 %s 个字符。
|
||||
max_size_error=长度最大为 %s 个字符。
|
||||
email_error=不是一个有效的邮箱地址。
|
||||
url_error=不是一个有效的 URL。
|
||||
unknown_error=未知错误:
|
||||
captcha_incorrect=验证码未匹配。
|
||||
password_not_match=密码与确认密码未匹配。
|
||||
|
||||
username_been_taken=用户名已经被占用。
|
||||
repo_name_been_taken=仓库名称已经被占用。
|
||||
org_name_been_taken=组织名称已经被占用。
|
||||
team_name_been_taken=团队名称已经被占用。
|
||||
email_been_used=邮箱地址已经被使用。
|
||||
ssh_key_been_used=SSH 密钥已经被使用。
|
||||
illegal_username=您的用户名包含非法字符。
|
||||
illegal_repo_name=仓库名称包含非法字符。
|
||||
illegal_org_name=组织名称包含非法字符。
|
||||
illegal_team_name=团队名称包含非法字符。
|
||||
username_password_incorrect=用户名或密码不正确。
|
||||
enterred_invalid_repo_name=请检查您输入的仓库名称是正确。
|
||||
enterred_invalid_owner_name=请检查您输入的新所有者用户名是否正确。
|
||||
enterred_invalid_password=请检查您输入的密码是否正确。
|
||||
user_not_exist=被操作的用户不存在!
|
||||
last_org_owner=被移除用户为最后一位管理员。请添加一位新的管理员再进行移除成员操作!
|
||||
|
||||
invalid_ssh_key=很抱歉,我们无法验证您输入的 SSH 密钥:%s
|
||||
unable_verify_ssh_key=Gogs 无法验证您输入的 SSH 密钥,但我们假设那是有效的密钥,请您自行确保其有效性!
|
||||
auth_failed=授权验证失败:%v
|
||||
|
||||
still_own_repo=您的帐户仍然是某些仓库的拥有者,您必须先转移或删除它们才能执行删除帐户操作!
|
||||
still_has_org=您的帐户仍旧是某些组织的成员,您必须先离开或删除组织。
|
||||
org_still_own_repo=该组织仍然是某些仓库的拥有者,您必须先转移或删除它们才能执行删除组织操作!
|
||||
|
||||
still_own_user=该授权认证依旧被部分用户使用,请先删除该部分用户后再试!
|
||||
|
||||
target_branch_not_exist=目标分支不存在。
|
||||
|
||||
[user]
|
||||
change_avatar=到 gravatar.com 上修改您的头像
|
||||
change_custom_avatar=到个人设置中修改头像
|
||||
join_on=加入于
|
||||
repositories=仓库列表
|
||||
activity=公开活动
|
||||
followers=关注者
|
||||
starred=已点赞
|
||||
following=关注中
|
||||
|
||||
[settings]
|
||||
profile=个人信息
|
||||
password=修改密码
|
||||
ssh_keys=管理 SSH 密钥
|
||||
social=社交帐号绑定
|
||||
applications=管理授权应用
|
||||
orgs=管理组织
|
||||
delete=删除帐户
|
||||
uid=用户 ID
|
||||
|
||||
public_profile=公开信息
|
||||
profile_desc=您的邮箱地址将会被公开,并被用于接收帐户的所有提醒和通知。
|
||||
full_name=自定义名称
|
||||
website=个人网站
|
||||
location=所在地区
|
||||
update_profile=更新信息
|
||||
update_profile_success=您的个人信息更新成功!
|
||||
change_username=用户名将被修改
|
||||
change_username_desc=用户名被修改,您确定要继续操作吗?这将会影响到所有与您帐户有关的链接。
|
||||
continue=继续操作
|
||||
cancel=取消操作
|
||||
|
||||
enable_custom_avatar=启动自定义头像
|
||||
enable_custom_avatar_helper=激活该选项来禁止从 Gravatar 获取头像
|
||||
choose_new_avatar=选择新的头像
|
||||
update_avatar=更新头像设置
|
||||
uploaded_avatar_not_a_image=上传的文件不是一张图片!
|
||||
no_custom_avatar_available=未上传过自定义头像,无法激活该选项。
|
||||
update_avatar_success=您的头像设置更新成功!
|
||||
|
||||
change_password=修改密码
|
||||
old_password=当前密码
|
||||
new_password=新的密码
|
||||
password_incorrect=当前密码不正确!
|
||||
change_password_success=密码修改成功!您现在可以使用新的密码登录。
|
||||
|
||||
manage_ssh_keys=管理 SSH 密钥
|
||||
add_key=增加密钥
|
||||
ssh_desc=以下是与您帐户所关联的 SSH 密钥,如果您发现有陌生的密钥,请立即删除它!
|
||||
ssh_helper=<strong>需要帮助?</strong> 请查看有关 <a href="%s">如何生成 SSH 密钥</a> 或 <a href="%s">常见 SSH 问题</a> 寻找答案。
|
||||
add_new_key=增加 SSH 密钥
|
||||
key_name=密钥名称
|
||||
key_content=密钥内容
|
||||
add_key_success=新的 SSH 密钥添加成功!
|
||||
delete_key=删除
|
||||
add_on=增加于
|
||||
last_used=上次使用在
|
||||
no_activity=没有最近活动
|
||||
|
||||
manage_social=管理关联社交帐户
|
||||
social_desc=以下是与您帐户所关联的社交帐号,如果您发现有陌生的关联,请立即解除绑定!
|
||||
unbind=解除绑定
|
||||
unbind_success=社交帐号解除绑定成功!
|
||||
|
||||
manage_access_token=管理个人操作令牌
|
||||
generate_new_token=生成新的令牌
|
||||
tokens_desc=您可以使用这些已生成的令牌来操作 Gogs API。
|
||||
new_token_desc=目前为止,任何令牌都对您的帐户拥有完整的操作权限。
|
||||
token_name=令牌名称
|
||||
generate_token=生成令牌
|
||||
generate_token_succees=新的操作令牌生成成功!您必须立即复制到一个安全的地方,因为该令牌只会显示一次!
|
||||
delete_token=删除令牌
|
||||
delete_token_success=个人操作令牌删除成功!请更新与该令牌有关的所有应用。
|
||||
|
||||
delete_account=删除当前帐户
|
||||
delete_prompt=删除操作会永久清除您的帐户信息,并且 <strong>不可恢复</strong>!
|
||||
confirm_delete_account=确认删除帐户
|
||||
delete_account_title=帐户删除操作
|
||||
delete_account_desc=该帐户将被永久性删除,您确定要继续操作吗?
|
||||
|
||||
[repo]
|
||||
owner=拥有者
|
||||
repo_name=仓库名称
|
||||
repo_name_helper=伟大的仓库名称一般都较短、令人深刻并且 <strong>独一无二</strong> 的。
|
||||
visibility=可见性
|
||||
visiblity_helper=本仓库将是 <span class="label label-red label-radius">私有的</span>
|
||||
fork_repo=派生仓库
|
||||
fork_from=派生自
|
||||
fork_visiblity_helper=派生仓库无法修改可见性
|
||||
repo_desc=仓库描述
|
||||
repo_lang=仓库语言
|
||||
repo_lang_helper=请选择 .gitignore 文件
|
||||
license=授权许可
|
||||
license_helper=请选择授权许可文件
|
||||
init_readme=使用 README.md 文件初始化仓库
|
||||
create_repo=创建仓库
|
||||
default_branch=默认分支
|
||||
mirror_interval=镜像同步周期(小时)
|
||||
goget_meta=Go-Get 支持
|
||||
goget_meta_helper=本仓库将可以通过 <span class="label label-blue label-radius">Go Get</span> 获取
|
||||
|
||||
need_auth=需要授权验证
|
||||
migrate_type=迁移类型
|
||||
migrate_type_helper=本仓库将是 <span class="label label-blue label-radius">镜像</span>
|
||||
migrate_repo=迁移仓库
|
||||
|
||||
copy_link=复制链接
|
||||
click_to_copy=复制到剪切板
|
||||
copied=复制成功
|
||||
clone_helper=不知道如何操作?访问 <a target="_blank" href="%s">此处</a> 查看帮助!
|
||||
unwatch=取消关注
|
||||
watch=关注
|
||||
unstar=取消点赞
|
||||
star=点赞
|
||||
fork=派生
|
||||
|
||||
no_desc=暂无描述
|
||||
quick_guide=快速帮助
|
||||
clone_this_repo=克隆当前仓库
|
||||
create_new_repo_command=从命令行创建一个新的仓库
|
||||
push_exist_repo=从命令行推送已经创建的仓库
|
||||
|
||||
branch=分支
|
||||
tree=目录树
|
||||
branch_and_tags=分支与标签
|
||||
branches=分支列表
|
||||
tags=标签列表
|
||||
issues=工单管理
|
||||
commits=提交历史
|
||||
releases=版本发布
|
||||
file_raw=原始文件
|
||||
file_history=文件历史
|
||||
file_view_raw=查看原始文件
|
||||
|
||||
commits.commits=次代码提交
|
||||
commits.search=搜索提交历史
|
||||
commits.find=查找
|
||||
commits.author=作者
|
||||
commits.message=备注
|
||||
commits.date=提交日期
|
||||
commits.older=更旧的提交
|
||||
commits.newer=更新的提交
|
||||
|
||||
settings=仓库设置
|
||||
settings.options=基本设置
|
||||
settings.collaboration=管理协作者
|
||||
settings.hooks=管理 Web 钩子
|
||||
settings.githooks=管理 Git 钩子
|
||||
settings.deploy_keys=管理部署密钥
|
||||
settings.basic_settings=基本设置
|
||||
settings.danger_zone=危险操作区
|
||||
settings.site=官方网站
|
||||
settings.update_settings=更新仓库设置
|
||||
settings.change_reponame=仓库名称将被修改
|
||||
settings.change_reponame_desc=仓库名称被修改,您确定要继续操作吗?这将会影响到所有与该仓库有关的链接。
|
||||
settings.transfer=转移仓库所有权
|
||||
settings.transfer_desc=您可以将仓库转移至您拥有管理员权限的帐户或组织。
|
||||
settings.new_owner_has_same_repo=新的仓库拥有者已经存在同名仓库!
|
||||
settings.delete=删除本仓库
|
||||
settings.delete_desc=删除仓库操作不可逆转,请三思而后行。
|
||||
settings.transfer_notices=<p>- 如果您转移给个人用户,您将对仓库失去所有权限。</p><p>- 如果您转移给您作为拥有者的组织,则可继续保持操作权限。</p>
|
||||
settings.update_settings_success=仓库设置更新成功!
|
||||
settings.transfer_owner=新拥有者
|
||||
settings.make_transfer=确认转移仓库
|
||||
settings.transfer_succeed=仓库所有权转移成功!
|
||||
settings.confirm_delete=确认删除仓库
|
||||
settings.add_collaborator=增加新的协作者
|
||||
settings.add_collaborator_success=成功添加新的协作者!
|
||||
settings.remove_collaborator_success=被操作的协作者已经被收回权限!
|
||||
settings.user_is_org_member=被操作的用户是组织成员,因此无法添加为协作者!
|
||||
settings.add_webhook=添加 Web 钩子
|
||||
settings.hooks_desc=Web 钩子允许您设定在 Gogs 上发生指定事件时对指定 URL 发送 POST 通知。查看 <a target="_blank" href="%s">Webhooks 文档</a> 获取更多信息。
|
||||
settings.githooks_desc=Git 钩子是由 Git 本身提供的功能,以下为 Gogs 所支持的钩子列表。
|
||||
settings.githook_edit_desc=如果钩子未启动,则会显示样例文件中的内容。如果想要删除某个钩子,则提交空白文本即可。
|
||||
settings.githook_name=钩子名称
|
||||
settings.githook_content=钩子文本
|
||||
settings.update_githook=更新钩子设置
|
||||
settings.remove_hook_success=Web 钩子删除成功!
|
||||
settings.add_webhook_desc=我们会通过 <code>POST</code> 请求将订阅事件信息发送至向指定 URL 地址。您可以设置不同的数据接收方式(JSON 或 <code>x-www-form-urlencoded</code>)。 请查阅 <a target="_blank" href="%s">Webhooks 文档</a> 获取更多信息。
|
||||
settings.payload_url=推送地址
|
||||
settings.content_type=数据格式
|
||||
settings.secret=密钥文本
|
||||
settings.event_desc=请设置您希望触发 Web 钩子的事件:
|
||||
settings.event_push_only=只推送 <code>push</code> 事件。
|
||||
settings.active=是否激活
|
||||
settings.active_helper=当指定事件发生时我们将会触发此 Web 钩子。
|
||||
settings.add_hook_success=Web 钩子添加成功!
|
||||
settings.update_webhook=更新 Web 钩子
|
||||
settings.update_hook_success=Web 钩子更新成功!
|
||||
settings.delete_webhook=删除 Web 钩子
|
||||
settings.recent_deliveries=最近推送记录
|
||||
settings.hook_type=钩子类型
|
||||
settings.add_slack_hook_desc=为您的仓库增加 <a href="%s">Slack</a> 集成。
|
||||
settings.slack_token=令牌
|
||||
settings.slack_domain=域名
|
||||
settings.slack_channel=频道
|
||||
|
||||
diff.browse_source=浏览代码
|
||||
diff.parent=父节点
|
||||
diff.commit=当前提交
|
||||
diff.data_not_available=暂无可用数据
|
||||
diff.show_diff_stats=显示文件统计
|
||||
diff.stats_desc=共有 <strong> %d 个文件被更改</strong>,包括 <strong>%d 次插入</strong> 和 <strong>%d 次删除</strong>
|
||||
diff.bin=二进制
|
||||
diff.view_file=查看文件
|
||||
|
||||
release.releases=版本发布
|
||||
release.new_release=发布新版
|
||||
release.draft=草稿
|
||||
release.prerelease=预发行
|
||||
release.stable=稳定
|
||||
release.edit=编辑
|
||||
release.ahead=在该版本发布之后已有 <strong>%d</strong> 次代码提交到 %s 分支
|
||||
release.source_code=源代码
|
||||
release.tag_name=标签名称
|
||||
release.target=目标分支
|
||||
release.tag_helper=选择或创建一个已经存在的标签
|
||||
release.release_title=发布标题
|
||||
release.content_with_md=使用 <a href="%s">Markdown</a> 编辑内容
|
||||
release.write=内容编辑
|
||||
release.preview=效果预览
|
||||
release.content_placeholder=请输入内容
|
||||
release.loading=正在加载...
|
||||
release.prerelease_desc=这是一个预发行版本
|
||||
release.prerelease_helper=我们会告知用户不建议将本次发布投入生产环境使用。
|
||||
release.publish=发布版本
|
||||
release.save_draft=保存草稿
|
||||
release.edit_release=编辑发布信息
|
||||
release.tag_name_already_exist=已经存在使用相同标签进行发布的版本。
|
||||
|
||||
[org]
|
||||
org_name_holder=组织名称
|
||||
org_name_helper=伟大的组织都有一个简短而寓意深刻的名字。
|
||||
org_email_helper=组织的邮箱用于接收所有通知和确认邮件。
|
||||
create_org=创建组织
|
||||
repo_updated=最后更新于
|
||||
people=组织成员
|
||||
invite_someone=邀请他人加入
|
||||
teams=组织团队
|
||||
lower_members=名成员
|
||||
lower_repositories=个仓库
|
||||
create_new_team=创建新的团队
|
||||
org_desc=组织描述
|
||||
team_name=团队名称
|
||||
team_desc=团队描述
|
||||
team_name_helper=您可以使用该名称来通知改组全体成员。
|
||||
team_desc_helper=一句话描述这个团队是做什么的。
|
||||
team_permission_desc=请选择该团队所具有的权限等级:
|
||||
|
||||
settings=组织设置
|
||||
settings.options=基本设置
|
||||
settings.full_name=组织全名
|
||||
settings.website=官方网站
|
||||
settings.location=所在地区
|
||||
settings.update_settings=更新组织设置
|
||||
settings.change_orgname=组织名称将被修改
|
||||
settings.change_orgname_desc=组织名称被修改,您确定要继续操作吗?这将会影响到所有与该组织有关的链接。
|
||||
settings.update_setting_success=组织设置更新成功!
|
||||
settings.delete=删除组织
|
||||
settings.delete_account=删除当前组织
|
||||
settings.delete_prompt=删除操作会永久清除该组织的信息,并且 <strong>不可恢复</strong>!
|
||||
settings.confirm_delete_account=确认删除组织
|
||||
settings.delete_org_title=组织删除操作
|
||||
settings.delete_org_desc=该组织将被永久性删除,您确定要继续操作吗?
|
||||
settings.hooks_desc=在此处添加的 Web 钩子将会应用到该组织下的 <strong>所有仓库</strong>。
|
||||
|
||||
members.public=公开成员
|
||||
members.public_helper=设为私有
|
||||
members.private=私有成员
|
||||
members.private_helper=设为公开
|
||||
members.owner=管理员
|
||||
members.member=普通成员
|
||||
members.conceal=隐藏身份
|
||||
members.remove=移除成员
|
||||
members.leave=离开组织
|
||||
members.invite_desc=请输入被邀请到组织 %s 的用户名称:
|
||||
members.invite_now=立即邀请
|
||||
|
||||
teams.join=加入团队
|
||||
teams.leave=离开团队
|
||||
teams.read_access=读取权限
|
||||
teams.read_access_helper=这个团队将拥有查看和克隆所属仓库的权限。
|
||||
teams.write_access=写入权限
|
||||
teams.write_access_helper=这个团队将拥有查看、克隆和推送所属仓库的权限。
|
||||
teams.admin_access=管理权限
|
||||
teams.admin_access_helper=这个团队将拥有查看、克隆、推送和添加其他组织成员到团队的权限。
|
||||
teams.no_desc=该团队暂无描述
|
||||
teams.settings=团队设置
|
||||
teams.owners_permission_desc=管理员团队对 <strong>所有仓库</strong> 具有操作权限,且对组织具有 <strong>管理员权限</strong>。
|
||||
teams.members=团队成员
|
||||
teams.update_settings=更新团队设置
|
||||
teams.delete_team=删除当前团队
|
||||
teams.add_team_member=添加团队成员
|
||||
teams.delete_team_title=团队删除操作
|
||||
teams.delete_team_desc=删除操作会永久清除有关该团队的信息,您确定要继续操作吗?团队成员可能会失去对某些仓库的操作权限。
|
||||
teams.delete_team_success=指定团队删除成功!
|
||||
teams.read_permission_desc=该团队拥有对所属仓库的 <strong>读取</strong> 权限,团队成员可以进行查看和克隆等只读操作。
|
||||
teams.write_permission_desc=该团队拥有对所属仓库的 <strong>读取</strong> 和 <strong>写入</strong> 的权限。
|
||||
teams.admin_permission_desc=该团队拥有一定的 <strong>管理</strong> 权限,团队成员可以读取、克隆、推送以及添加其它仓库协作者。
|
||||
teams.repositories=团队仓库
|
||||
teams.add_team_repository=添加团队仓库
|
||||
teams.remove_repo=移除仓库
|
||||
teams.add_nonexistent_repo=您尝试添加到团队的仓库不存在,请先创建仓库!
|
||||
|
||||
[admin]
|
||||
dashboard=控制面板
|
||||
users=用户管理
|
||||
organizations=组织管理
|
||||
repositories=仓库管理
|
||||
authentication=授权认证管理
|
||||
config=应用配置管理
|
||||
notices=系统提示管理
|
||||
monitor=应用监控面板
|
||||
prev=上一页
|
||||
next=下一页
|
||||
|
||||
dashboard.statistic=应用统计数据
|
||||
dashboard.operations=管理员操作
|
||||
dashboard.system_status=系统监视状态
|
||||
dashboard.statistic_info=Gogs 数据库统计:<b>%d</b> 位用户,<b>%d</b> 个组织,<b>%d</b> 个公钥,<b>%d</b> 个仓库,<b>%d</b> 个仓库关注,<b>%d</b> 个赞,<b>%d</b> 次行为,<b>%d</b> 条权限记录,<b>%d</b> 张工单,<b>%d</b> 次评论,<b>%d</b> 个社交帐号,<b>%d</b> 个用户关注,<b>%d</b> 个镜像,<b>%d</b> 个版本发布,<b>%d</b> 个登录源,<b>%d</b> 个 Web 钩子,<b>%d</b> 个里程碑,<b>%d</b> 个标签,<b>%d</b> 个钩子任务,<b>%d</b> 个团队,<b>%d</b> 个更新任务,<b>%d</b> 个附件。
|
||||
dashboard.operation_name=操作名称
|
||||
dashboard.operation_switch=开关
|
||||
dashboard.operation_run=执行
|
||||
dashboard.clean_unbind_oauth=清理未绑定社交帐号
|
||||
dashboard.clean_unbind_oauth_success=所有未绑定社交数据清除成功!
|
||||
dashboard.delete_inactivate_accounts=删除所有未激活帐户
|
||||
dashboard.delete_inactivate_accounts_success=所有未激活帐号清除成功!
|
||||
dashboard.delete_repo_archives=删除所有仓库存档
|
||||
dashboard.delete_repo_archives_success=所有仓库存档清除成功!
|
||||
dashboard.git_gc_repos=对仓库进行垃圾回收
|
||||
dashboard.git_gc_repos_success=所有仓库垃圾回收成功!
|
||||
dashboard.server_uptime=服务运行时间
|
||||
dashboard.current_goroutine=当前 Goroutines 数量
|
||||
dashboard.current_memory_usage=当前内存使用量
|
||||
dashboard.total_memory_allocated=所有被分配的内存
|
||||
dashboard.memory_obtained=内存占用量
|
||||
dashboard.pointer_lookup_times=指针查找次数
|
||||
dashboard.memory_allocate_times=内存分配次数
|
||||
dashboard.memory_free_times=内存释放次数
|
||||
dashboard.current_heap_usage=当前 Heap 内存使用量
|
||||
dashboard.heap_memory_obtained=Heap 内存占用量
|
||||
dashboard.heap_memory_idle=Heap 内存空闲量
|
||||
dashboard.heap_memory_in_use=正在使用的 Heap 内存
|
||||
dashboard.heap_memory_released=被释放的 Heap 内存
|
||||
dashboard.heap_objects=Heap 对象数量
|
||||
dashboard.bootstrap_stack_usage=启动 Stack 使用量
|
||||
dashboard.stack_memory_obtained=被分配的 Stack 内存
|
||||
dashboard.mspan_structures_usage=MSpan 结构内存使用量
|
||||
dashboard.mspan_structures_obtained=被分配的 MSpan 结构内存
|
||||
dashboard.mcache_structures_usage=MCache 结构内存使用量
|
||||
dashboard.mcache_structures_obtained=被分配的 MCache 结构内存
|
||||
dashboard.profiling_bucket_hash_table_obtained=被分配的剖析哈希表内存
|
||||
dashboard.gc_metadata_obtained=被分配的 GC 元数据内存
|
||||
dashboard.other_system_allocation_obtained=其它被分配的系统内存
|
||||
dashboard.next_gc_recycle=下次 GC 内存回收量
|
||||
dashboard.last_gc_time=距离上次 GC 时间
|
||||
dashboard.total_gc_time=GC 执行时间总量
|
||||
dashboard.total_gc_pause=GC 暂停时间总量
|
||||
dashboard.last_gc_pause=上次 GC 暂停时间
|
||||
dashboard.gc_times=GC 执行次数
|
||||
|
||||
users.user_manage_panel=用户管理面板
|
||||
users.new_account=创建新的帐户
|
||||
users.name=用户名
|
||||
users.activated=已激活
|
||||
users.admin=管理员
|
||||
users.repos=仓库数
|
||||
users.created=创建时间
|
||||
users.edit=编辑
|
||||
users.auth_source=认证源
|
||||
users.local=本地
|
||||
users.auth_login_name=认证登录名
|
||||
users.update_profile_success=该用户信息更新成功!
|
||||
users.edit_account=编辑用户信息
|
||||
users.is_activated=该用户已被激活
|
||||
users.is_admin=该用户具有管理员权限
|
||||
users.allow_git_hook=该帐户具有创建 Git 钩子的权限
|
||||
users.update_profile=更新用户信息
|
||||
users.delete_account=删除该用户
|
||||
users.still_own_repo=该帐户仍然是某些仓库的拥有者,您必须先转移或删除它们才能执行删除帐户操作!
|
||||
users.still_has_org=该帐户仍旧是某些组织的成员,您必须先使其离开或删除组织。
|
||||
|
||||
orgs.org_manage_panel=组织管理面板
|
||||
orgs.name=组织名称
|
||||
orgs.teams=团队数
|
||||
orgs.members=成员数
|
||||
|
||||
repos.repo_manage_panel=仓库管理界面
|
||||
repos.owner=所有者
|
||||
repos.name=仓库名称
|
||||
repos.private=私有库
|
||||
repos.watches=关注数
|
||||
repos.stars=点赞数
|
||||
repos.issues=工单数
|
||||
|
||||
auths.auth_manage_panel=授权认证管理面板
|
||||
auths.new=添加新的认证源
|
||||
auths.name=认证名称
|
||||
auths.type=认证类型
|
||||
auths.enabled=已启用
|
||||
auths.updated=最后更新时间
|
||||
auths.auth_type=授权类型
|
||||
auths.auth_name=授权名称
|
||||
auths.domain=域名
|
||||
auths.host=主机地址
|
||||
auths.port=主机端口
|
||||
auths.base_dn=Base DN
|
||||
auths.attributes=Search Attributes
|
||||
auths.filter=Search Filter
|
||||
auths.ms_ad_sa=Ms Ad SA
|
||||
auths.smtp_auth=SMTP 授权类型
|
||||
auths.smtphost=SMTP 主机地址
|
||||
auths.smtpport=SMTP 主机端口
|
||||
auths.enable_tls=启用 TLS 加密
|
||||
auths.enable_auto_register=允许授权用户自动注册
|
||||
auths.tips=帮助提示
|
||||
auths.edit=修改授权认证设置
|
||||
auths.activated=该授权认证已经启用
|
||||
auths.update_success=授权认证设置更新成功!
|
||||
auths.update=更新授权认证信息
|
||||
auths.delete=删除该授权认证
|
||||
auths.delete_auth_title=授权认证删除操作
|
||||
auths.delete_auth_desc=该授权认证将被删除,您确定要继续吗?
|
||||
|
||||
config.server_config=服务器配置
|
||||
config.app_name=应用名称
|
||||
config.app_ver=应用版本
|
||||
config.app_url=应用 URL
|
||||
config.domain=应用域名
|
||||
config.offline_mode=离线模式
|
||||
config.disable_router_log=关闭路由日志
|
||||
config.run_user=运行用户
|
||||
config.run_mode=运行模式
|
||||
config.repo_root_path=仓库根目录
|
||||
config.static_file_root_path=静态文件根目录
|
||||
config.log_file_root_path=日志文件根目录
|
||||
config.script_type=脚本类型
|
||||
config.reverse_auth_user=反向代理认证
|
||||
config.db_config=数据库配置
|
||||
config.db_type=数据库类型
|
||||
config.db_host=主机地址
|
||||
config.db_name=数据库名称
|
||||
config.db_user=连接用户
|
||||
config.db_ssl_mode=SSL 模式
|
||||
config.db_ssl_mode_helper=(仅限 "postgres" 使用)
|
||||
config.db_path=数据库路径
|
||||
config.db_path_helper=(仅限 "sqlite3" 使用)
|
||||
config.service_config=服务配置
|
||||
config.register_email_confirm=注册邮件确认
|
||||
config.disable_register=关闭注册功能
|
||||
config.require_sign_in_view=强制登录浏览
|
||||
config.mail_notify=邮件通知提醒
|
||||
config.enable_cache_avatar=开启缓存头像
|
||||
config.active_code_lives=激活用户链接有效期
|
||||
config.reset_password_code_lives=重置密码链接有效期
|
||||
config.webhook_config=Web 钩子配置
|
||||
config.task_interval=任务周期
|
||||
config.deliver_timeout=推送超时
|
||||
config.mailer_config=邮件配置
|
||||
config.mailer_enabled=启用服务
|
||||
config.mailer_name=发送者名称
|
||||
config.mailer_host=邮件主机地址
|
||||
config.mailer_user=发送者帐号
|
||||
config.oauth_config=社交帐号配置
|
||||
config.oauth_enabled=启用服务
|
||||
config.cache_config=Cache 配置
|
||||
config.cache_adapter=Cache 适配器
|
||||
config.cache_interval=Cache 周期
|
||||
config.cache_conn=Cache 连接字符串
|
||||
config.session_config=Session 配置
|
||||
config.session_provider=Session 提供者
|
||||
config.provider_config=提供者配置
|
||||
config.cookie_name=Cookie 名称
|
||||
config.enable_set_cookie=启用设置 Cookie
|
||||
config.gc_interval_time=GC 周期
|
||||
config.session_life_time=Session 生命周期
|
||||
config.https_only=仅限 HTTPS
|
||||
config.cookie_life_time=Cookie 生命周期
|
||||
config.picture_config=图片配置
|
||||
config.picture_service=图片服务
|
||||
config.disable_gravatar=禁用 Gravatar 头像
|
||||
config.log_config=日志配置
|
||||
config.log_mode=日志模式
|
||||
|
||||
monitor.cron=Cron 任务
|
||||
monitor.name=任务名称
|
||||
monitor.schedule=任务安排
|
||||
monitor.next=下次执行时间
|
||||
monitor.previous=上次执行时间
|
||||
monitor.execute_times=执行次数
|
||||
monitor.process=运行中进程
|
||||
monitor.desc=进程描述
|
||||
monitor.start=开始时间
|
||||
monitor.execute_time=已执行时间
|
||||
|
||||
notices.system_notice_list=系统提示管理
|
||||
notices.type=提示类型
|
||||
notices.type_1=仓库
|
||||
notices.desc=描述
|
||||
notices.op=操作
|
||||
notices.delete_success=系统提示删除成功!
|
||||
|
||||
[action]
|
||||
create_repo=创建了仓库 <a href="%s/%s">%s</a>
|
||||
commit_repo=推送了 <a href="%s/%s/src/%s">%s</a> 分支的代码到 <a href="%s/%s">%s</a>
|
||||
create_issue=创建了工单 <a href="%s/%s/issues/%s">%s#%s</a>
|
||||
comment_issue=评论了工单 <a href="%s/%s/issues/%s">%s#%s</a>
|
||||
transfer_repo=将仓库 <code>%s</code> 转移至 <a href="/%s%s">%s</a>
|
||||
push_tag=推送了标签 <a href="%s/%s/src/%s">%s</a> 到 <a href="%s/%s">%s</a>
|
||||
compare_2_commits=查看 2 次提交的内容对比
|
||||
|
||||
[tool]
|
||||
ago=之前
|
||||
from_now=之后
|
||||
now=现在
|
||||
1s=1 秒%s
|
||||
1m=1 分钟%s
|
||||
1h=1 小时%s
|
||||
1d=1 天%s
|
||||
1w=1 周%s
|
||||
1mon=1 月%s
|
||||
1y=1 年%s
|
||||
seconds=%d 秒%s
|
||||
minutes=%d 分钟%s
|
||||
hours=%d 小时%s
|
||||
days=%d 天%s
|
||||
weeks=%d 周%s
|
||||
months=%d 月%s
|
||||
years=%d 年%s
|
||||
raw_seconds=秒
|
||||
raw_minutes=分钟
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
718
conf/locale/locale_zh-HK.ini
Executable file
718
conf/locale/locale_zh-HK.ini
Executable file
@@ -0,0 +1,718 @@
|
||||
app_desc=基於 Go 語言的自助 Git 服務
|
||||
|
||||
home=首頁
|
||||
dashboard=控制面版
|
||||
explore=探索
|
||||
help=幫助
|
||||
sign_in=登錄
|
||||
social_sign_in=社交帳號登錄:第 2 步 <small>關聯帳號</small>
|
||||
sign_out=退出
|
||||
sign_up=註冊
|
||||
register=註冊
|
||||
website=官方網站
|
||||
version=當前版本
|
||||
page=頁面
|
||||
template=模版
|
||||
language=語言選項
|
||||
|
||||
username=用戶名
|
||||
email=郵箱
|
||||
password=密碼
|
||||
re_type=確認密碼
|
||||
captcha=驗證碼
|
||||
|
||||
repository=倉庫
|
||||
organization=組織
|
||||
mirror=鏡像
|
||||
new_repo=創建新的倉庫
|
||||
new_migrate=遷移外部倉庫
|
||||
new_fork=新的派生倉庫
|
||||
new_org=創建新的組織
|
||||
manage_org=管理我的組織
|
||||
admin_panel=管理面版
|
||||
account_settings=帳戶設置
|
||||
settings=帳戶設置
|
||||
|
||||
news_feed=最新活動
|
||||
pull_requests=合併請求
|
||||
issues=問題管理
|
||||
|
||||
cancel=取消
|
||||
|
||||
[install]
|
||||
install=安裝頁面
|
||||
title=首次執行安裝程序
|
||||
requite_db_desc=Gogs 允許後端數據庫為 MySQL、PostgreSQL 或 SQLite3,但是 SQLite3 一般只有官方二進制發行版才支持。
|
||||
db_type=數據庫類型
|
||||
host=數據庫主機
|
||||
user=數據庫用戶
|
||||
password=數據庫用戶密碼
|
||||
db_name=數據庫名稱
|
||||
db_helper=如果您使用 MySQL,請使用 INNODB 引擎以及 utf8_general_ci 字符集。
|
||||
ssl_mode=SSL 模式
|
||||
path=數據庫文件路徑
|
||||
sqlite_helper=SQLite3 數據庫的文件路徑。
|
||||
general_title=應用基本設置
|
||||
repo_path=倉庫根目錄
|
||||
repo_path_helper=所有 Git 遠程倉庫都將被存放於該目錄。
|
||||
run_user=執行系統用戶
|
||||
run_user_helper=該用戶必須具有對倉庫根目錄和執行 Gogs 的操作權限。
|
||||
domain=域名
|
||||
domain_helper=該設置影響 SSH 復製地址。
|
||||
app_url=應用 URL
|
||||
app_url_helper=該設置影響 HTTP/HTTPS 復製地址和一些郵箱中的連結。
|
||||
email_title=郵件服務設置(可選)
|
||||
smtp_host=SMTP 主機
|
||||
mailer_user=發送郵箱
|
||||
mailer_password=發送郵箱密碼
|
||||
notify_title=通知提醒設置(可選)
|
||||
register_confirm=啟用註冊郵箱確認
|
||||
mail_notify=啟用郵件通知提醒
|
||||
admin_title=管理員帳號設置
|
||||
admin_name=管理員用戶名
|
||||
admin_password=管理員密碼
|
||||
confirm_password=確認密碼
|
||||
admin_email=管理員郵箱
|
||||
install_gogs=立即安裝
|
||||
test_git_failed=無法識別 'git' 命令:%v
|
||||
sqlite3_not_available=您所使用的發行版本不支持 SQLite3,請從 %s 下載官方構建版,而不是 gobuild 版本。
|
||||
invalid_db_setting=數據庫設置不正確:%v
|
||||
invalid_repo_path=倉庫根目錄設置不正確:%v
|
||||
run_user_not_match=執行系統用戶非當前用戶:%s -> %s
|
||||
save_config_failed=應用配置保存失敗:%v
|
||||
invalid_admin_setting=管理員帳戶設置不正確:%v
|
||||
install_success=您好!我們很高興您選擇使用 Gogs,祝您使用愉快,代碼從此無 BUG!
|
||||
|
||||
[home]
|
||||
uname_holder=用戶名或郵箱
|
||||
password_holder=密碼
|
||||
switch_dashboard_context=切換控制面版用戶
|
||||
my_repos=我的倉庫
|
||||
collaborative_repos=參與協作的倉庫
|
||||
my_orgs=我的組織
|
||||
my_mirrors=我的鏡像
|
||||
|
||||
[explore]
|
||||
repos=探索倉庫
|
||||
|
||||
[auth]
|
||||
create_new_account=創建帳戶
|
||||
register_hepler_msg=已經註冊?立即登錄!
|
||||
social_register_hepler_msg=已經註冊?立即綁定!
|
||||
disable_register_prompt=對不起,註冊功能已被關閉。請聯系網站管理員。
|
||||
disable_register_mail=對不起,註冊郵箱確認功能已被關閉。
|
||||
remember_me=記住登錄
|
||||
forgot_password=忘記密碼
|
||||
forget_password=忘記密碼?
|
||||
sign_up_now=還沒帳戶?馬上註冊。
|
||||
confirmation_mail_sent_prompt=一封新的確認郵件已經被發送至 <b>%s</b>,請檢查您的收件箱並在 %d 小時內完成確認註冊操作。
|
||||
sign_in_email=登錄到您的郵箱
|
||||
active_your_account=激活您的帳戶
|
||||
resent_limit_prompt=對不起,您請求發送激活郵件過於頻繁,請等待 3 分鐘後再試!
|
||||
has_unconfirmed_mail=%s 您好,系統檢測到您有一封發送至 <b>%s</b> 但未被確認的郵件。如果您未收到激活郵件,或需要重新發送,請單擊下方的按鈕。
|
||||
resend_mail=單擊此處重新發送確認郵件
|
||||
email_not_associate=您輸入的郵箱地址未被關聯到任何帳號!
|
||||
send_reset_mail=單擊此處(重新)發送您的密碼重置郵件
|
||||
reset_password=重置密碼
|
||||
invalid_code=對不起,您的確認代碼已過期或已失效。
|
||||
reset_password_helper=單擊此處重置密碼
|
||||
password_too_short=密碼長度不能少於 6 位!
|
||||
|
||||
[form]
|
||||
UserName=用戶名
|
||||
RepoName=倉庫名稱
|
||||
Email=郵箱地址
|
||||
Password=密碼
|
||||
Retype=確認密碼
|
||||
SSHTitle=SSH 密鑰名稱
|
||||
HttpsUrl=HTTPS URL 地址
|
||||
PayloadUrl=推送地址
|
||||
TeamName=團隊名稱
|
||||
AuthName=認證名稱
|
||||
AdminEmail=管理員郵箱
|
||||
|
||||
require_error=不能為空。
|
||||
alpha_dash_error=必須為英文字母、阿拉伯數字或橫線(-_)。
|
||||
alpha_dash_dot_error=必須為英文字母、阿拉伯數字、橫線(-_)或點。
|
||||
min_size_error=長度最小為 %s 個字符。
|
||||
max_size_error=長度最大為 %s 個字符。
|
||||
email_error=不是一個有效的郵箱地址。
|
||||
url_error=不是一個有效的 URL。
|
||||
unknown_error=未知錯誤:
|
||||
captcha_incorrect=驗證碼未匹配。
|
||||
password_not_match=密碼與確認密碼未匹配。
|
||||
|
||||
username_been_taken=用戶名已經被佔用。
|
||||
repo_name_been_taken=倉庫名稱已經被佔用。
|
||||
org_name_been_taken=組織名稱已經被佔用。
|
||||
team_name_been_taken=團隊名稱已經被佔用。
|
||||
email_been_used=郵箱地址已經被使用。
|
||||
ssh_key_been_used=SSH 密鑰已經被使用。
|
||||
illegal_username=您的用戶名包含不合法字符。
|
||||
illegal_repo_name=倉庫名稱包含不合法字符。
|
||||
illegal_org_name=組織名稱包含不合法字符。
|
||||
illegal_team_name=團隊名稱包含不合法字符。
|
||||
username_password_incorrect=用戶名或密碼不正確。
|
||||
enterred_invalid_repo_name=請檢查您輸入的倉庫名稱是正確。
|
||||
enterred_invalid_owner_name=請檢查您輸入的新所有者用戶名是否正確。
|
||||
enterred_invalid_password=請檢查您輸入的密碼是否正確。
|
||||
user_not_exist=被操作的用戶不存在!
|
||||
last_org_owner=被移除用戶為最後一位管理員。請添加一位新的管理員再進行移除成員操作!
|
||||
|
||||
invalid_ssh_key=很抱歉,我們無法驗證您輸入的 SSH 密鑰:%s
|
||||
unable_verify_ssh_key=Gogs 無法驗證您輸入的 SSH 密鑰,但我們假設那是有效的密鑰,請您自行確保其有效性!
|
||||
auth_failed=授權驗證失敗:%v
|
||||
|
||||
still_own_repo=您的帳戶仍然是某些倉庫的擁有者,您必須先轉移或刪除它們才能執行刪除帳戶操作!
|
||||
still_has_org=您的帳戶仍舊是某些組織的成員,您必須先離開或刪除組織。
|
||||
org_still_own_repo=該組織仍然是某些倉庫的擁有者,您必須先轉移或刪除它們才能執行刪除組織操作!
|
||||
|
||||
still_own_user=該授權認證依舊被部分用戶使用,請先刪除該部分用戶後再試!
|
||||
|
||||
target_branch_not_exist=目標分支不存在
|
||||
|
||||
[user]
|
||||
change_avatar=到 gravatar.com 上修改您的頭像
|
||||
change_custom_avatar=到個人設置中修改頭像
|
||||
join_on=加入於
|
||||
repositories=倉庫列表
|
||||
activity=公開活動
|
||||
followers=關註者
|
||||
starred=已讚好
|
||||
following=關註中
|
||||
|
||||
[settings]
|
||||
profile=個人信息
|
||||
password=修改密碼
|
||||
ssh_keys=管理 SSH 密鑰
|
||||
social=社交帳號綁定
|
||||
applications=管理授權應用
|
||||
orgs=管理組織
|
||||
delete=刪除帳戶
|
||||
uid=用戶 ID
|
||||
|
||||
public_profile=公開信息
|
||||
profile_desc=您的郵箱地址將會被公開,並被用於接收帳戶的所有提醒和通知。
|
||||
full_name=自定義名稱
|
||||
website=個人網站
|
||||
location=所在地區
|
||||
update_profile=更新信息
|
||||
update_profile_success=您的個人信息更新成功!
|
||||
change_username=用戶名將被修改
|
||||
change_username_desc=用戶名被修改,您確定要繼續操作嗎?這將會影響到所有與您帳戶有關的連結。
|
||||
continue=繼續操作
|
||||
cancel=取消操作
|
||||
|
||||
enable_custom_avatar=啟動自定義頭像
|
||||
enable_custom_avatar_helper=激活該選項來禁止從 Gravatar 獲取頭像
|
||||
choose_new_avatar=選擇新的頭像
|
||||
update_avatar=更新頭像設置
|
||||
uploaded_avatar_not_a_image=上傳的文件不是一張圖片!
|
||||
no_custom_avatar_available=沒有任何自定義頭像,無法激活該選項。
|
||||
update_avatar_success=您的頭像設置更新成功!
|
||||
|
||||
change_password=修改密碼
|
||||
old_password=當前密碼
|
||||
new_password=新的密碼
|
||||
password_incorrect=當前密碼不正確!
|
||||
change_password_success=密碼修改成功!您現在可以使用新的密碼登錄。
|
||||
|
||||
manage_ssh_keys=管理 SSH 密鑰
|
||||
add_key=增加密鑰
|
||||
ssh_desc=以下是與您帳戶所關聯的 SSH 密鑰,如果您發現有陌生的密鑰,請立即刪除它!
|
||||
ssh_helper=<strong>需要幫助嗎?</strong> 請查看有關 <a href="%s"> 如何生成 SSH 密鑰</a> 的指南或 <a href="%s"> SSH 的常見問題</a> 的疑難排解。
|
||||
add_new_key=增加 SSH 密鑰
|
||||
key_name=密鑰名稱
|
||||
key_content=密鑰內容
|
||||
add_key_success=新的 SSH 密鑰添加成功!
|
||||
delete_key=刪除
|
||||
add_on=增加於
|
||||
last_used=上次使用在
|
||||
no_activity=沒有最近活動
|
||||
|
||||
manage_social=管理關聯社交帳戶
|
||||
social_desc=以下是與您帳戶所關聯的社交帳號,如果您發現有陌生的關聯,請立即解除綁定!
|
||||
unbind=解除綁定
|
||||
unbind_success=社交帳號解除綁定成功!
|
||||
|
||||
manage_access_token=管理個人操作令牌
|
||||
generate_new_token=生成新的令牌
|
||||
tokens_desc=您可以使用這些已生成的令牌來操作 Gogs API。
|
||||
new_token_desc=目前為止,任何令牌都對您的帳戶擁有完整的操作權限。
|
||||
token_name=令牌名稱
|
||||
generate_token=生成令牌
|
||||
generate_token_succees=新的操作令牌生成成功!您必須立即復製到一個安全的地方,因為該令牌只會顯示一次!
|
||||
delete_token=删除令牌
|
||||
delete_token_success=個人操作令牌刪除成功!請更新與該令牌有關的所有應用。
|
||||
|
||||
delete_account=刪除當前帳戶
|
||||
delete_prompt=刪除操作會永久清除您的帳戶信息,並且 <strong>不可恢復</strong>!
|
||||
confirm_delete_account=確認刪除帳戶
|
||||
delete_account_title=帳戶刪除操作
|
||||
delete_account_desc=該帳戶將被永久性刪除,您確定要繼續操作嗎?
|
||||
|
||||
[repo]
|
||||
owner=擁有者
|
||||
repo_name=倉庫名稱
|
||||
repo_name_helper=偉大的倉庫名稱一般都較短、令人深刻並且 <strong>獨一無二</strong> 的。
|
||||
visibility=可見度
|
||||
visiblity_helper=本倉庫將是 <span class="label label-red label-radius">私有的</span>
|
||||
fork_repo=派生倉庫
|
||||
fork_from=派生自
|
||||
fork_visiblity_helper=派生倉庫無法修改可見性。
|
||||
repo_desc=倉庫描述
|
||||
repo_lang=倉庫語言
|
||||
repo_lang_helper=請選擇 .gitignore 文件
|
||||
license=授權許可
|
||||
license_helper=請選擇授權許可文件
|
||||
init_readme=使用 README.md 文件初始化倉庫
|
||||
create_repo=創建倉庫
|
||||
default_branch=默認分支
|
||||
mirror_interval=鏡像同步周期(小時)
|
||||
goget_meta=Go-Get 支持
|
||||
goget_meta_helper=本倉庫將可以通過 <span class="label label-blue label-radius">Go Get</span> 獲取
|
||||
|
||||
need_auth=需要授權驗證
|
||||
migrate_type=遷移類型
|
||||
migrate_type_helper=本倉庫將是 <span class="label label-blue label-radius">鏡像</span>
|
||||
migrate_repo=遷移倉庫
|
||||
|
||||
copy_link=復製連結
|
||||
click_to_copy=復製到剪切簿
|
||||
copied=復製成功
|
||||
clone_helper=不知道如何操作?訪問 <a target="_blank"href="%s"> 帮助説明</a> !
|
||||
unwatch=取消關註
|
||||
watch=關註
|
||||
unstar=取消讚好
|
||||
star=讚好
|
||||
fork=派生
|
||||
|
||||
no_desc=暫無描述
|
||||
quick_guide=快速幫助
|
||||
clone_this_repo=復製當前倉庫
|
||||
create_new_repo_command=從命令行創建一個新的倉庫
|
||||
push_exist_repo=從命令行推送已經創建的倉庫
|
||||
|
||||
branch=分支
|
||||
tree=目錄樹
|
||||
branch_and_tags=分支與標籤
|
||||
branches=分支列表
|
||||
tags=標籤列表
|
||||
issues=問題管理
|
||||
commits=提交歷史
|
||||
releases=版本發佈
|
||||
file_raw=原始文件
|
||||
file_history=文件歷史
|
||||
file_view_raw=查看原始文件
|
||||
|
||||
commits.commits=次代碼提交
|
||||
commits.search=搜索提交歷史
|
||||
commits.find=查找
|
||||
commits.author=作者
|
||||
commits.message=備註
|
||||
commits.date=提交日期
|
||||
commits.older=更舊的提交
|
||||
commits.newer=更新的提交
|
||||
|
||||
settings=倉庫設置
|
||||
settings.options=基本設置
|
||||
settings.collaboration=管理協作者
|
||||
settings.hooks=管理 Web 鉤子
|
||||
settings.githooks=管理 Git 鉤子
|
||||
settings.deploy_keys=管理部署密鑰
|
||||
settings.basic_settings=基本設置
|
||||
settings.danger_zone=危險操作區
|
||||
settings.site=官方網站
|
||||
settings.update_settings=更新倉庫設置
|
||||
settings.change_reponame=倉庫名稱將被修改
|
||||
settings.change_reponame_desc=倉庫名稱被修改,您確定要繼續操作嗎?這將會影響到所有與該倉庫有關的連結。
|
||||
settings.transfer=轉移倉庫所有權
|
||||
settings.transfer_desc=您可以將倉庫轉移至您擁有管理員權限的帳戶或組織。
|
||||
settings.new_owner_has_same_repo=新的倉庫擁有者已經存在同名倉庫!
|
||||
settings.delete=刪除本倉庫
|
||||
settings.delete_desc=刪除倉庫操作不可逆轉,請三思而後行。
|
||||
settings.transfer_notices=<p>- 如果您轉移給個人用戶,您將對倉庫失去所有權限。</p><p>- 如果您轉移給您作為擁有者的組織,則可繼續保持操作權限。</p>
|
||||
settings.update_settings_success=倉庫設置更新成功!
|
||||
settings.transfer_owner=新擁有者
|
||||
settings.make_transfer=確認轉移倉庫
|
||||
settings.transfer_succeed=倉庫所有權轉移成功!
|
||||
settings.confirm_delete=確認刪除倉庫
|
||||
settings.add_collaborator=增加新的協作者
|
||||
settings.add_collaborator_success=成功添加新的協作者!
|
||||
settings.remove_collaborator_success=被操作的協作者已經被收回權限!
|
||||
settings.user_is_org_member=被操作的用戶是組織成員,因此無法添加為協作者!
|
||||
settings.add_webhook=添加 Web 鉤子
|
||||
settings.hooks_desc=Web 鉤子允許您設定在 Gogs 上發生指定事件時對指定 URL 發送 POST 通知。查看 <a target="_blank" href="%s">Webhooks 文檔</a> 獲取更多信息。
|
||||
settings.githooks_desc=Git 鉤子是由 Git 本身提供的功能,以下為 Gogs 所支持的鉤子列表。
|
||||
settings.githook_edit_desc=如果鉤子未啟動,則會顯示樣例文件中的內容。如果想要刪除某個鉤子,則提交空白文本即可。
|
||||
settings.githook_name=鉤子名稱
|
||||
settings.githook_content=鉤子文本
|
||||
settings.update_githook=更新鉤子設置
|
||||
settings.remove_hook_success=Web 鉤子刪除成功!
|
||||
settings.add_webhook_desc=我們會通過 <code>POST</code> 請求將訂閱事件信息發送至向指定 URL 地址。您可以設置不同的數據接收方式(JSON 或 <code>x-www-form-urlencoded</code>)。 請查閱 <a target="_blank" href="%s">Webhooks 指南</a>.
|
||||
settings.payload_url=推送地址
|
||||
settings.content_type=數據格式
|
||||
settings.secret=密鑰文本
|
||||
settings.event_desc=請設置您希望觸發 Web 鉤子的事件:
|
||||
settings.event_push_only=只推送 <code>push</code> 事件。
|
||||
settings.active=是否激活
|
||||
settings.active_helper=當指定事件發生時我們將會觸發此 Web 鉤子。
|
||||
settings.add_hook_success=Web 鉤子添加成功!
|
||||
settings.update_webhook=更新 Web 鉤子
|
||||
settings.update_hook_success=Web 鉤子更新成功!
|
||||
settings.delete_webhook=刪除 Web 鉤子
|
||||
settings.recent_deliveries=最近推送記錄
|
||||
settings.hook_type=鉤子類型
|
||||
settings.add_slack_hook_desc=為您的倉庫增加 <a href="%s">Slack</a> 集成。
|
||||
settings.slack_token=令牌
|
||||
settings.slack_domain=域名
|
||||
settings.slack_channel=頻道
|
||||
|
||||
diff.browse_source=瀏覽代碼
|
||||
diff.parent=父節點
|
||||
diff.commit=當前提交
|
||||
diff.data_not_available=暫無可用數據
|
||||
diff.show_diff_stats=顯示文件統計
|
||||
diff.stats_desc=共有 <strong> %d 個文件被更改</strong>,包括 <strong>%d 次插入</strong> 和 <strong>%d 次删除</strong>
|
||||
diff.bin=二進制
|
||||
diff.view_file=查看文件
|
||||
|
||||
release.releases=Releases
|
||||
release.new_release=New Release
|
||||
release.draft=Draft
|
||||
release.prerelease=Pre-Release
|
||||
release.stable=Stable
|
||||
release.edit=edit
|
||||
release.ahead=<strong>%d</strong> commits to %s since this release
|
||||
release.source_code=Source Code
|
||||
release.tag_name=Tag name
|
||||
release.target=Target
|
||||
release.tag_helper=Choose an existing tag, or create a new tag on publish.
|
||||
release.release_title=Release title
|
||||
release.content_with_md=Content with <a href="%s">Markdown</a>
|
||||
release.write=Write
|
||||
release.preview=Preview
|
||||
release.content_placeholder=Write some content
|
||||
release.loading=Loading...
|
||||
release.prerelease_desc=This is a pre-release
|
||||
release.prerelease_helper=We’ll point out that this release is identified as non-production ready.
|
||||
release.publish=Publish Release
|
||||
release.save_draft=Save Draft
|
||||
release.edit_release=Edit Release
|
||||
release.tag_name_already_exist=Release with this tag name has already existed.
|
||||
|
||||
[org]
|
||||
org_name_holder=組織名稱
|
||||
org_name_helper=偉大的組織都有一個簡短而寓意深刻的名字。
|
||||
org_email_helper=組織的郵箱用於接收所有通知和確認郵件。
|
||||
create_org=創建組織
|
||||
repo_updated=最後更新於
|
||||
people=組織成員
|
||||
invite_someone=邀請他人加入
|
||||
teams=組織團隊
|
||||
lower_members=名成員
|
||||
lower_repositories=個倉庫
|
||||
create_new_team=創建新的團隊
|
||||
org_desc=組織描述
|
||||
team_name=團隊名稱
|
||||
team_desc=團隊描述
|
||||
team_name_helper=您可以使用該名稱來通知改組全體成員。
|
||||
team_desc_helper=一句話描述這個團隊是做什麼的。
|
||||
team_permission_desc=請選擇該團隊所具有的權限等級:
|
||||
|
||||
settings=組織設置
|
||||
settings.options=基本設置
|
||||
settings.full_name=組織全名
|
||||
settings.website=官方網站
|
||||
settings.location=所在地區
|
||||
settings.update_settings=更新組織設置
|
||||
settings.change_orgname=組織名稱將被修改
|
||||
settings.change_orgname_desc=組織名稱被修改,您確定要繼續操作嗎?這將會影響到所有與該組織有關的連結。
|
||||
settings.update_setting_success=組織設置更新成功!
|
||||
settings.delete=刪除組織
|
||||
settings.delete_account=刪除當前組織
|
||||
settings.delete_prompt=刪除操作會永久清除該組織的信息,並且 <strong>不可恢復</strong>!
|
||||
settings.confirm_delete_account=確認刪除組織
|
||||
settings.delete_org_title=組織刪除操作
|
||||
settings.delete_org_desc=該組織將被永久性刪除,您確定要繼續操作嗎?
|
||||
settings.hooks_desc=在此處添加的 Web 鉤子將會應用到該組織下的 <strong>所有倉庫</strong>。
|
||||
|
||||
members.public=公開成員
|
||||
members.public_helper=設為私有
|
||||
members.private=私有成員
|
||||
members.private_helper=設為公開
|
||||
members.owner=管理員
|
||||
members.member=普通成員
|
||||
members.conceal=隱藏身份
|
||||
members.remove=移除成員
|
||||
members.leave=離開組織
|
||||
members.invite_desc=請輸入被邀請到組織 %s 的用戶名稱:
|
||||
members.invite_now=立即邀請
|
||||
|
||||
teams.join=加入團隊
|
||||
teams.leave=離開團隊
|
||||
teams.read_access=讀取權限
|
||||
teams.read_access_helper=這個團隊將擁有查看和復製所屬倉庫的權限。
|
||||
teams.write_access=寫入權限
|
||||
teams.write_access_helper=這個團隊將擁有查看、復製和推送所屬倉庫的權限。
|
||||
teams.admin_access=管理權限
|
||||
teams.admin_access_helper=這個團隊將擁有查看、復製、推送和添加其他組織成員到團隊的權限。
|
||||
teams.no_desc=該團隊暫無描述
|
||||
teams.settings=團隊設置
|
||||
teams.owners_permission_desc=管理員團隊對 <strong>所有倉庫</strong> 具有操作權限,且對組織具有 <strong>管理員權限</strong>。
|
||||
teams.members=團隊成員
|
||||
teams.update_settings=更新團隊設置
|
||||
teams.delete_team=刪除當前團隊
|
||||
teams.add_team_member=添加團隊成員
|
||||
teams.delete_team_title=團隊刪除操作
|
||||
teams.delete_team_desc=刪除操作會永久清除有關該團隊的信息,您確定要繼續操作嗎?團隊成員可能會失去對某些倉庫的操作權限。
|
||||
teams.delete_team_success=指定團隊刪除成功!
|
||||
teams.read_permission_desc=該團隊擁有對所屬倉庫的 <strong>讀取</strong> 權限,團隊成員可以進行查看和復製等只讀操作。
|
||||
teams.write_permission_desc=該團隊擁有對所屬倉庫的 <strong>讀取</strong> 和 <strong>寫入</strong> 的權限。
|
||||
teams.admin_permission_desc=該團隊擁有一定的 <strong>管理</strong> 權限,團隊成員可以讀取、復製、推送以及添加其它倉庫協作者。
|
||||
teams.repositories=團隊倉庫
|
||||
teams.add_team_repository=添加團隊倉庫
|
||||
teams.remove_repo=移除倉庫
|
||||
teams.add_nonexistent_repo=您嘗試添加到團隊的倉庫不存在,請先創建倉庫!
|
||||
|
||||
[admin]
|
||||
dashboard=控制面版
|
||||
users=用戶管理
|
||||
organizations=組織管理
|
||||
repositories=倉庫管理
|
||||
authentication=授權認證管理
|
||||
config=應用配置管理
|
||||
notices=系統提示管理
|
||||
monitor=應用監控面版
|
||||
prev=上一頁
|
||||
next=下一頁
|
||||
|
||||
dashboard.statistic=應用統計數據
|
||||
dashboard.operations=管理員操作
|
||||
dashboard.system_status=系統監視狀態
|
||||
dashboard.statistic_info=Gogs 數據庫統計:<b>%d</b> 位用戶,<b>%d</b> 個組織,<b>%d</b> 個公鑰,<b>%d</b> 個倉庫,<b>%d</b> 個倉庫關註,<b>%d</b> 個贊,<b>%d</b> 次行為,<b>%d</b> 條權限記錄,<b>%d</b> 個問題,<b>%d</b> 次評論,<b>%d</b> 個社交帳號,<b>%d</b> 個用戶關註,<b>%d</b> 個鏡像,<b>%d</b> 個版本發佈,<b>%d</b> 個登錄源,<b>%d</b> 個 Web 鉤子,<b>%d</b> 個里程碑,<b>%d</b> 個標籤,<b>%d</b> 個鉤子任務,<b>%d</b> 個團隊,<b>%d</b> 個更新任務,<b>%d</b> 個附件。
|
||||
dashboard.operation_name=操作名稱
|
||||
dashboard.operation_switch=開關
|
||||
dashboard.operation_run=執行
|
||||
dashboard.clean_unbind_oauth=清理未綁定社交帳號
|
||||
dashboard.clean_unbind_oauth_success=所有未綁定社交數據清除成功!
|
||||
dashboard.delete_inactivate_accounts=刪除所有未激活帳戶
|
||||
dashboard.delete_inactivate_accounts_success=所有未激活帳號清除成功!
|
||||
dashboard.delete_repo_archives=刪除所有倉庫存檔
|
||||
dashboard.delete_repo_archives_success=所有倉庫存檔清除成功!
|
||||
dashboard.git_gc_repos=對倉庫進行垃圾回收
|
||||
dashboard.git_gc_repos_success=所有倉庫的垃圾回收已成功完成!
|
||||
dashboard.server_uptime=服務執行時間
|
||||
dashboard.current_goroutine=當前 Goroutines 數量
|
||||
dashboard.current_memory_usage=當前內存使用量
|
||||
dashboard.total_memory_allocated=所有被分配的內存
|
||||
dashboard.memory_obtained=內存佔用量
|
||||
dashboard.pointer_lookup_times=指針查找次數
|
||||
dashboard.memory_allocate_times=內存分配次數
|
||||
dashboard.memory_free_times=內存釋放次數
|
||||
dashboard.current_heap_usage=當前 Heap 內存使用量
|
||||
dashboard.heap_memory_obtained=Heap 內存佔用量
|
||||
dashboard.heap_memory_idle=Heap 內存空閒量
|
||||
dashboard.heap_memory_in_use=正在使用的 Heap 內存
|
||||
dashboard.heap_memory_released=被釋放的 Heap 內存
|
||||
dashboard.heap_objects=Heap 對象數量
|
||||
dashboard.bootstrap_stack_usage=啟動 Stack 使用量
|
||||
dashboard.stack_memory_obtained=被分配的 Stack 內存
|
||||
dashboard.mspan_structures_usage=MSpan 結構內存使用量
|
||||
dashboard.mspan_structures_obtained=被分配的 MSpan 結構內存
|
||||
dashboard.mcache_structures_usage=MCache 結構內存使用量
|
||||
dashboard.mcache_structures_obtained=被分配的 MCache 結構內存
|
||||
dashboard.profiling_bucket_hash_table_obtained=被分配的剖析哈希表內存
|
||||
dashboard.gc_metadata_obtained=被分配的垃圾收集元數據內存
|
||||
dashboard.other_system_allocation_obtained=其它被分配的系統內存
|
||||
dashboard.next_gc_recycle=下次垃圾收集內存回收量
|
||||
dashboard.last_gc_time=距離上次垃圾收集時間
|
||||
dashboard.total_gc_time=垃圾收集執行時間總量
|
||||
dashboard.total_gc_pause=垃圾收集暫停時間總量
|
||||
dashboard.last_gc_pause=上次垃圾收集暫停時間
|
||||
dashboard.gc_times=垃圾收集執行次數
|
||||
|
||||
users.user_manage_panel=用戶管理面版
|
||||
users.new_account=創建新的帳戶
|
||||
users.name=用戶名
|
||||
users.activated=已激活
|
||||
users.admin=管理員
|
||||
users.repos=倉庫數
|
||||
users.created=創建時間
|
||||
users.edit=編輯
|
||||
users.auth_source=認證源
|
||||
users.local=本地
|
||||
users.auth_login_name=認證登錄名
|
||||
users.update_profile_success=該用戶信息更新成功!
|
||||
users.edit_account=編輯用戶信息
|
||||
users.is_activated=該用戶已被激活
|
||||
users.is_admin=該用戶具有管理員權限
|
||||
users.allow_git_hook=該帳戶具有創建 Git 鉤子的權限
|
||||
users.update_profile=更新用戶信息
|
||||
users.delete_account=刪除該用戶
|
||||
users.still_own_repo=該帳戶仍然是某些倉庫的擁有者,您必須先轉移或刪除它們才能執行刪除帳戶操作!
|
||||
users.still_has_org=該帳戶仍舊是某些組織的成員,您必須先使其離開或刪除組織。
|
||||
|
||||
orgs.org_manage_panel=組織管理面版
|
||||
orgs.name=組織名稱
|
||||
orgs.teams=團隊數
|
||||
orgs.members=成員數
|
||||
|
||||
repos.repo_manage_panel=倉庫管理界面
|
||||
repos.owner=所有者
|
||||
repos.name=倉庫名稱
|
||||
repos.private=私有庫
|
||||
repos.watches=關註數
|
||||
repos.stars=讚好數
|
||||
repos.issues=問題數
|
||||
|
||||
auths.auth_manage_panel=授權認證管理面版
|
||||
auths.new=添加新的認證源
|
||||
auths.name=認證名稱
|
||||
auths.type=認證類型
|
||||
auths.enabled=已啟用
|
||||
auths.updated=最後更新時間
|
||||
auths.auth_type=授權類型
|
||||
auths.auth_name=授權名稱
|
||||
auths.domain=域名
|
||||
auths.host=主機地址
|
||||
auths.port=主機端口
|
||||
auths.base_dn=Base DN
|
||||
auths.attributes=搜尋屬性
|
||||
auths.filter=搜尋過濾
|
||||
auths.ms_ad_sa=Ms Ad SA
|
||||
auths.smtp_auth=SMTP 授權類型
|
||||
auths.smtphost=SMTP 主機地址
|
||||
auths.smtpport=SMTP 主機端口
|
||||
auths.enable_tls=啟用 TLS 加密
|
||||
auths.enable_auto_register=允許授權用戶自動註冊
|
||||
auths.tips=幫助提示
|
||||
auths.edit=修改授權認證設置
|
||||
auths.activated=該授權認證已經啟用
|
||||
auths.update_success=授權認證設置更新成功!
|
||||
auths.update=更新授權認證信息
|
||||
auths.delete=刪除該授權認證
|
||||
auths.delete_auth_title=授權認證刪除操作
|
||||
auths.delete_auth_desc=該授權認證將被刪除,您確定要繼續嗎?
|
||||
|
||||
config.server_config=服務器配置
|
||||
config.app_name=應用名稱
|
||||
config.app_ver=應用版本
|
||||
config.app_url=應用 URL
|
||||
config.domain=應用域名
|
||||
config.offline_mode=離線模式
|
||||
config.disable_router_log=關閉路由日志
|
||||
config.run_user=執行用戶
|
||||
config.run_mode=執行模式
|
||||
config.repo_root_path=倉庫根目錄
|
||||
config.static_file_root_path=靜態文件根目錄
|
||||
config.log_file_root_path=日志文件根目錄
|
||||
config.script_type=腳本類型
|
||||
config.reverse_auth_user=反向代理認證
|
||||
config.db_config=數據庫配置
|
||||
config.db_type=數據庫類型
|
||||
config.db_host=主機地址
|
||||
config.db_name=數據庫名稱
|
||||
config.db_user=數據庫用戶
|
||||
config.db_ssl_mode=SSL 模式
|
||||
config.db_ssl_mode_helper=(僅限 "postgres" 使用)
|
||||
config.db_path=數據庫路徑
|
||||
config.db_path_helper=(僅限 "sqlite3" 使用)
|
||||
config.service_config=服務配置
|
||||
config.register_email_confirm=註冊郵件確認
|
||||
config.disable_register=關閉註冊功能
|
||||
config.require_sign_in_view=強制登錄瀏覽
|
||||
config.mail_notify=郵件通知提醒
|
||||
config.enable_cache_avatar=開啟緩存頭像
|
||||
config.active_code_lives=激活用戶連結有效期
|
||||
config.reset_password_code_lives=重置密碼連結有效期
|
||||
config.webhook_config=Web 鉤子配置
|
||||
config.task_interval=任務周期
|
||||
config.deliver_timeout=推送超時
|
||||
config.mailer_config=郵件配置
|
||||
config.mailer_enabled=啟用服務
|
||||
config.mailer_name=發送者名稱
|
||||
config.mailer_host=郵件主機地址
|
||||
config.mailer_user=發送者帳號
|
||||
config.oauth_config=社交帳號配置
|
||||
config.oauth_enabled=啟用服務
|
||||
config.cache_config=Cache 配置
|
||||
config.cache_adapter=Cache 適配器
|
||||
config.cache_interval=Cache 周期
|
||||
config.cache_conn=Cache 連接字符串
|
||||
config.session_config=Session 配置
|
||||
config.session_provider=Session 提供者
|
||||
config.provider_config=提供者配置
|
||||
config.cookie_name=Cookie 名稱
|
||||
config.enable_set_cookie=啟用設置 Cookie
|
||||
config.gc_interval_time=垃圾收集周期
|
||||
config.session_life_time=Session 生命周期
|
||||
config.https_only=僅限 HTTPS
|
||||
config.cookie_life_time=Cookie 生命周期
|
||||
config.picture_config=圖片配置
|
||||
config.picture_service=圖片服務
|
||||
config.disable_gravatar=禁用 Gravatar 頭像
|
||||
config.log_config=日誌配置
|
||||
config.log_mode=日誌模式
|
||||
|
||||
monitor.cron=Cron 任務
|
||||
monitor.name=任務名稱
|
||||
monitor.schedule=任務安排
|
||||
monitor.next=下次執行時間
|
||||
monitor.previous=上次執行時間
|
||||
monitor.execute_times=執行次數
|
||||
monitor.process=執行中進程
|
||||
monitor.desc=進程描述
|
||||
monitor.start=開始時間
|
||||
monitor.execute_time=已執行時間
|
||||
|
||||
notices.system_notice_list=系統提示管理
|
||||
notices.type=提示類型
|
||||
notices.type_1=倉庫
|
||||
notices.desc=描述
|
||||
notices.op=操作
|
||||
notices.delete_success=系統提示刪除成功!
|
||||
|
||||
[action]
|
||||
create_repo=創建了倉庫 <a href="%s/%s">%s</a>
|
||||
commit_repo=推送了 <a href="%s/%s/src/%s">%s</a> 分支的代碼到 <a href="%s/%s">%s</a>
|
||||
create_issue=創建了問題 <a href="%s/%s/issues/%s">%s#%s</a>
|
||||
comment_issue=評論了問題 <a href="%s/%s/issues/%s">%s#%s</a>
|
||||
transfer_repo=將倉庫 <code>%s</code> 轉移至 <a href="/%s%s">%s</a>
|
||||
push_tag=推送了標籤 <a href="%s/%s/src/%s">%s</a> 到 <a href="%s/%s">%s</a>
|
||||
compare_2_commits=查看 2 次提交的內容對比
|
||||
|
||||
[tool]
|
||||
ago=之前
|
||||
from_now=之後
|
||||
now=現在
|
||||
1s=1 秒%s
|
||||
1m=1 分鐘%s
|
||||
1h=1 小時%s
|
||||
1d=1 天%s
|
||||
1w=1 周%s
|
||||
1mon=1 月%s
|
||||
1y=1 年%s
|
||||
seconds=%d 秒%s
|
||||
minutes=%d 分鐘%s
|
||||
hours=%d 小時%s
|
||||
days=%d 天%s
|
||||
weeks=%d 周%s
|
||||
months=%d 月%s
|
||||
years=%d 年%s
|
||||
raw_seconds=秒
|
||||
raw_minutes=分鐘
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
[program:gogs]
|
||||
user=git
|
||||
command = /home/git/gogs/start.sh
|
||||
directory = /home/git/gogs
|
||||
autostart = true
|
||||
stdout_logfile = /var/gogs.log
|
||||
stderr_logfile = /var/gogs-error.log
|
||||
environment=HOME="/home/git"
|
||||
@@ -1,26 +0,0 @@
|
||||
### Binary install gogs on ubuntu 14.04 LTS
|
||||
|
||||
### create user and install denpendency
|
||||
- sudo adduser git
|
||||
- sudo apt-get update
|
||||
- sudo apt-get upgrade
|
||||
- sudo apt-get install git
|
||||
- sudo apt-get install mysql-server
|
||||
|
||||
### create the database
|
||||
- $mysql -u root -p
|
||||
- mysql> SET GLOBAL storage_engine = 'InnoDB';
|
||||
- mysql> CREATE DATABASE gogs CHARACTER SET utf8 COLLATE utf8_bin;
|
||||
- mysql> GRANT ALL PRIVILEGES ON gogs.* TO 'root'@'localhost' IDENTIFIED BY 'password';
|
||||
- mysql> FLUSH PRIVILEGES;
|
||||
- mysql> QUIT
|
||||
|
||||
### install the gogs
|
||||
- mkdir gogs
|
||||
- cd gogs
|
||||
- curl -L http://gobuild.io/github.com/gogits/gogs/v0.3.0/linux/amd64 -o v0.3.0.zip
|
||||
- unzip v0.3.0.zip
|
||||
- ./start.sh
|
||||
|
||||
> The up-to-date binary could be found at
|
||||
> http://gobuild.io/download/github.com/gogits/gogs
|
||||
@@ -1,48 +0,0 @@
|
||||
##Install gogs under ubuntu 14.04 LTS 32bit from source code
|
||||
|
||||
###Requirements
|
||||
- Go Programming Language: Version >= 1.2
|
||||
- git(bash): Version >= 1.6.6(both server and client)
|
||||
- MySQL: Version >= 5.1 or PostgreSQL or NOTHING.
|
||||
|
||||
### Create the user which will run git
|
||||
- sudo adduser git
|
||||
- su git
|
||||
|
||||
### Install git and Mysql-server
|
||||
- sudo apt-get install git
|
||||
- sudo apt-get install mysql-server
|
||||
|
||||
### Create database
|
||||
- $ mysql -u root -p
|
||||
- mysql> SET GLOBAL storage_engine = 'InnoDB';
|
||||
- mysql> CREATE DATABASE gogs CHARACTER SET utf8 COLLATE utf8_bin;
|
||||
- mysql> GRANT ALL PRIVILEGES ON gogs.* TO 'root'@'localhost' IDENTIFIED BY 'pasword';
|
||||
- mysql> FLUSH PRIVILEGES;
|
||||
- mysql> QUIT
|
||||
|
||||
### install go from source
|
||||
- sudo apt-get install build-essential
|
||||
- sudo apt-get install mercurial
|
||||
- hg clone -r release https://go.googlecode.com/hg/ /home/git/golang/
|
||||
|
||||
|
||||
- echo export GOROOT=/home/git/golang >>.bashrc
|
||||
- echo export GOARCH=386 >>.bashrc
|
||||
- echo export GOOS=linux >>.bashrc
|
||||
- echo export GOBIN= /home/git/golang/bin >>.bashrc
|
||||
- echo export GOPATH=$HOME/app/Go >>.bashrc
|
||||
- echo PATH=${PATH}: /$HOME/golang/bin >>.bashrc
|
||||
- cd $GOROOT/src
|
||||
- ./make.bash
|
||||
|
||||
### Download and install dependencies
|
||||
- $ go get -u github.com/gogits/gogs
|
||||
|
||||
### Build main program
|
||||
- $ cd $GOPATH/src/github.com/gogits/gogs
|
||||
- $ go build
|
||||
- $ ./start.sh
|
||||
|
||||
### At present, you could access gogs from http://localhost:3000
|
||||
|
||||
89
docker/README.md
Normal file
89
docker/README.md
Normal file
@@ -0,0 +1,89 @@
|
||||
Docker
|
||||
======
|
||||
|
||||
TOOLS ARE WRITTEN FOR TESTING AND TO SEE WHAT IT IS!
|
||||
|
||||
For this to work you will need the nifty docker tool [fig].
|
||||
|
||||
The most simple setup will look like this:
|
||||
|
||||
```sh
|
||||
./assemble_blocks.sh docker_gogs w_db option_db_mysql
|
||||
fig up
|
||||
|
||||
```
|
||||
|
||||
That's it. You have GoGS running in docker linked to a MySQL docker container.
|
||||
|
||||
Now visit http://localhost:3000/ and give details for the admin account an you're up and running.
|
||||
|
||||
|
||||
How does it work
|
||||
----------------
|
||||
|
||||
`./assemble_blocks.sh` will look in `blocks` for subdirectories.
|
||||
In the subdirectories there are three relevant files: `Dockerfile`, `config` and `fig`.
|
||||
|
||||
`Dockerfile` will be copied to `docker/` (also means last `Dockerfile` wins).
|
||||
|
||||
The `config` file contains lines which will in the gogs docker container end up in `$GOGS_PATH/custom/config/app.ini` and by this gogs will be configured.
|
||||
Here you can define things like the MySQL server for your database block.
|
||||
|
||||
The `fig` file will just be added to `fig.yml`, which is used by fig to manage your containers.
|
||||
This inculdes container linking!
|
||||
|
||||
Just have a look at them and it will be clear how to write your own blocks.
|
||||
|
||||
Just some things
|
||||
|
||||
- all files (`Dockerfile`, `fig` and `config`) are optional
|
||||
- the gogs block should always be the first block
|
||||
|
||||
Currently the blocks are designed that, the blocks that start with `docker` pull in the base docker image.
|
||||
Then one block starting with `w` defines, what containers should be linked to the gogs container.
|
||||
For every option in the `w` block you need to add an `option` container.
|
||||
|
||||
Example:
|
||||
|
||||
```sh
|
||||
./assemble_blocks.sh docker_gogs w_db_cache option_db_mysql option_cache_redis
|
||||
```
|
||||
|
||||
|
||||
More sophisticated Example
|
||||
--------------------------
|
||||
|
||||
Her is a more elaborated example
|
||||
|
||||
```sh
|
||||
./assemble_blocks.sh docker_gogs w_db_cache_session option_db_postgresql option_cache_redis option_session_mysql
|
||||
fig up
|
||||
```
|
||||
|
||||
This will set up four containters and link them proberly. One for each of
|
||||
|
||||
- gogs
|
||||
- database (postgresql)
|
||||
- cache (redis)
|
||||
- session (mysql)
|
||||
|
||||
WARNING: This will not work at the Moment! MySQL session is broken!
|
||||
|
||||
|
||||
Remark
|
||||
------
|
||||
|
||||
After you execute `assemble_blocks.sh` you should always trigger `fig build` to inculde the the new init script `init_gogs.sh` in the docker image.
|
||||
|
||||
If you want to use another GoGS docker file, but keep everything else the same, you can create a block, e.g. `docker_gogs_custom`, with only a `Dockerfile` and call
|
||||
|
||||
```sh
|
||||
./assemble_blocks.sh docker_gogs_custom w_db option_database_mysql
|
||||
```
|
||||
|
||||
This will pull in the `Dockerfile` from `docker_gogs` instead of the one from `docker_gogs`.
|
||||
|
||||
`Dockerfile`s for the `master` and `dev` branch are provided as `docker_gogs` and `docker_gogs_dev`
|
||||
|
||||
|
||||
[fig]:http://www.fig.sh/
|
||||
72
docker/assemble_blocks.sh
Executable file
72
docker/assemble_blocks.sh
Executable file
@@ -0,0 +1,72 @@
|
||||
#!/bin/bash
|
||||
|
||||
blocks_dir=blocks
|
||||
docker_dir=docker
|
||||
template_dir=templates
|
||||
|
||||
docker_file=Dockerfile
|
||||
|
||||
gogs_config_file=conf.tmp
|
||||
gogs_config=config
|
||||
gogs_init_file=$docker_dir/init_gogs.sh
|
||||
|
||||
fig_file=fig.yml
|
||||
fig_config=fig
|
||||
|
||||
gogs_init_template=$template_dir/init_gogs.sh.tpl
|
||||
|
||||
if [ "$#" == 0 ]; then
|
||||
blocks=`ls $blocks_dir`
|
||||
if [ -z "$blocks" ]; then
|
||||
echo "No Blocks available in $blocks_dir"
|
||||
else
|
||||
echo "Available Blocks:"
|
||||
for block in $blocks; do
|
||||
echo " $block"
|
||||
done
|
||||
fi
|
||||
exit 0
|
||||
fi
|
||||
|
||||
for file in $gogs_config_file $fig_file; do
|
||||
if [ -e $file ]; then
|
||||
echo "Deleting $file"
|
||||
rm $file
|
||||
fi
|
||||
done
|
||||
|
||||
for dir in $@; do
|
||||
current_dir=$blocks_dir/$dir
|
||||
if [ ! -d "$current_dir" ]; then
|
||||
echo "$current_dir is not a directory"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -e $current_dir/$docker_file ]; then
|
||||
echo "Copying $current_dir/$docker_file to $docker_dir/$docker_file"
|
||||
cp $current_dir/$docker_file $docker_dir/$docker_file
|
||||
fi
|
||||
|
||||
if [ -e $current_dir/$gogs_config ]; then
|
||||
echo "Adding $current_dir/$gogs_config to $gogs_config_file"
|
||||
cat $current_dir/$gogs_config >> $gogs_config_file
|
||||
echo "" >> $gogs_config_file
|
||||
fi
|
||||
|
||||
if [ -e $current_dir/$fig_config ]; then
|
||||
echo "Adding $current_dir/$fig_config to $fig_file"
|
||||
cat $current_dir/fig >> $fig_file
|
||||
echo "" >> $fig_file
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Creating $gogs_init_file"
|
||||
sed "/{{ CONFIG }}/{
|
||||
r $gogs_config_file
|
||||
d
|
||||
}" $gogs_init_template > $gogs_init_file
|
||||
|
||||
if [ -e $gogs_config_file ]; then
|
||||
echo "Removing temporary GoGS config"
|
||||
rm $gogs_config_file
|
||||
fi
|
||||
52
docker/blocks/docker_gogs/Dockerfile
Normal file
52
docker/blocks/docker_gogs/Dockerfile
Normal file
@@ -0,0 +1,52 @@
|
||||
FROM ubuntu:14.04
|
||||
|
||||
# This part is taken from the official docker image --------------------
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
build-essential ca-certificates curl \
|
||||
bzr git mercurial \
|
||||
--no-install-recommends
|
||||
|
||||
ENV GOLANG_VERSION 1.3
|
||||
|
||||
RUN curl -sSL http://golang.org/dl/go$GOLANG_VERSION.src.tar.gz \
|
||||
| tar -v -C /usr/src -xz
|
||||
WORKDIR /usr/src/go
|
||||
|
||||
RUN cd src && ./make.bash --no-clean 2>&1
|
||||
|
||||
ENV PATH /usr/src/go/bin:$PATH
|
||||
|
||||
RUN mkdir -p /go/src
|
||||
ENV GOPATH /go
|
||||
ENV PATH /go/bin:$PATH
|
||||
WORKDIR /go
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
|
||||
RUN useradd -m git
|
||||
|
||||
ENV GOGS_PATH $GOPATH/src/github.com/gogits/gogs
|
||||
ENV GOGS_CUSTOM_CONF_PATH $GOGS_PATH/custom/conf
|
||||
ENV GOGS_CUSTOM_CONF $GOGS_CUSTOM_CONF_PATH/app.ini
|
||||
|
||||
RUN go get -u -d github.com/gogits/gogs
|
||||
# WORKDIR $GOGS_PATH
|
||||
WORKDIR /go/src/github.com/gogits/gogs
|
||||
RUN go build github.com/gogits/gogs
|
||||
RUN chown -R git $GOGS_PATH
|
||||
|
||||
ADD init_gogs.sh /tmp/
|
||||
RUN chown git /tmp/init_gogs.sh
|
||||
RUN chmod +x /tmp/init_gogs.sh
|
||||
|
||||
USER git
|
||||
ENV HOME /home/git
|
||||
ENV USER git
|
||||
ENV PATH $GOGS_PATH:$PATH
|
||||
|
||||
RUN git config --global user.name "GoGS"
|
||||
|
||||
ENTRYPOINT ["/tmp/init_gogs.sh"]
|
||||
CMD ["gogs", "web"]
|
||||
53
docker/blocks/docker_gogs_dev/Dockerfile
Normal file
53
docker/blocks/docker_gogs_dev/Dockerfile
Normal file
@@ -0,0 +1,53 @@
|
||||
FROM ubuntu:14.04
|
||||
|
||||
# This part is derived from the official docker image ------------------
|
||||
|
||||
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
|
||||
apt-get install -qy \
|
||||
build-essential ca-certificates curl \
|
||||
bzr git mercurial \
|
||||
--no-install-recommends
|
||||
|
||||
ENV GOLANG_VERSION 1.3
|
||||
|
||||
RUN curl -sSL http://golang.org/dl/go$GOLANG_VERSION.src.tar.gz \
|
||||
| tar -v -C /usr/src -xz
|
||||
WORKDIR /usr/src/go
|
||||
|
||||
RUN cd src && ./make.bash --no-clean 2>&1
|
||||
|
||||
ENV PATH /usr/src/go/bin:$PATH
|
||||
|
||||
RUN mkdir -p /go/src
|
||||
ENV GOPATH /go
|
||||
ENV PATH /go/bin:$PATH
|
||||
WORKDIR /go
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
|
||||
RUN useradd -m git
|
||||
|
||||
ENV GOGS_PATH $GOPATH/src/github.com/gogits/gogs
|
||||
ENV GOGS_CUSTOM_CONF_PATH $GOGS_PATH/custom/conf
|
||||
ENV GOGS_CUSTOM_CONF $GOGS_CUSTOM_CONF_PATH/app.ini
|
||||
|
||||
RUN git clone -b dev https://github.com/gogits/gogs.git $GOGS_PATH
|
||||
# WORKDIR $GOGS_PATH
|
||||
WORKDIR /go/src/github.com/gogits/gogs
|
||||
RUN go get -d && go build
|
||||
RUN chown -R git $GOGS_PATH
|
||||
|
||||
ADD init_gogs.sh /tmp/
|
||||
RUN chown git /tmp/init_gogs.sh
|
||||
RUN chmod +x /tmp/init_gogs.sh
|
||||
|
||||
USER git
|
||||
ENV HOME /home/git
|
||||
ENV USER git
|
||||
ENV PATH $GOGS_PATH:$PATH
|
||||
|
||||
RUN git config --global user.name "GoGS"
|
||||
|
||||
ENTRYPOINT ["/tmp/init_gogs.sh"]
|
||||
CMD ["gogs", "web"]
|
||||
3
docker/blocks/option_cache_memcache/config
Normal file
3
docker/blocks/option_cache_memcache/config
Normal file
@@ -0,0 +1,3 @@
|
||||
[cache]
|
||||
DB_TYPE = memcache
|
||||
HOST = HOST = ${CACHE_1_PORT_11211_TCP_ADDR}:${CACHE_1_PORT_11211_TCP_PORT}
|
||||
2
docker/blocks/option_cache_memcache/fig
Normal file
2
docker/blocks/option_cache_memcache/fig
Normal file
@@ -0,0 +1,2 @@
|
||||
cache:
|
||||
image: sylvainlasnier/memcached:latest
|
||||
3
docker/blocks/option_cache_redis/config
Normal file
3
docker/blocks/option_cache_redis/config
Normal file
@@ -0,0 +1,3 @@
|
||||
[cache]
|
||||
DB_TYPE = redis
|
||||
HOST = ${CACHE_1_PORT_6379_TCP_ADDR}:${CACHE_1_PORT_6379_TCP_PORT}
|
||||
2
docker/blocks/option_cache_redis/fig
Normal file
2
docker/blocks/option_cache_redis/fig
Normal file
@@ -0,0 +1,2 @@
|
||||
cache:
|
||||
image: redis:latest
|
||||
6
docker/blocks/option_db_mysql/config
Normal file
6
docker/blocks/option_db_mysql/config
Normal file
@@ -0,0 +1,6 @@
|
||||
[database]
|
||||
DB_TYPE = mysql
|
||||
HOST = ${DB_1_PORT_3306_TCP_ADDR}:${DB_1_PORT_3306_TCP_PORT}
|
||||
NAME = ${DB_1_ENV_MYSQL_DATABASE}
|
||||
USER = ${DB_1_ENV_MYSQL_USER}
|
||||
PASSWD = ${DB_1_ENV_MYSQL_PASSWORD}
|
||||
7
docker/blocks/option_db_mysql/fig
Normal file
7
docker/blocks/option_db_mysql/fig
Normal file
@@ -0,0 +1,7 @@
|
||||
db:
|
||||
image: mysql:latest
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: rootpass
|
||||
MYSQL_DATABASE: gogs
|
||||
MYSQL_USER: gogs
|
||||
MYSQL_PASSWORD: password
|
||||
6
docker/blocks/option_db_postgresql/config
Normal file
6
docker/blocks/option_db_postgresql/config
Normal file
@@ -0,0 +1,6 @@
|
||||
[database]
|
||||
DB_TYPE = postgres
|
||||
HOST = ${DB_1_PORT_5432_TCP_ADDR}:${DB_1_PORT_5432_TCP_PORT}
|
||||
NAME = ${DB_1_ENV_POSTGRESQL_DB}
|
||||
USER = ${DB_1_ENV_POSTGRESQL_USER}
|
||||
PASSWD = ${DB_1_ENV_POSTGRESQL_PASS}
|
||||
6
docker/blocks/option_db_postgresql/fig
Normal file
6
docker/blocks/option_db_postgresql/fig
Normal file
@@ -0,0 +1,6 @@
|
||||
db:
|
||||
image: wyaeld/postgres:9.3
|
||||
environment:
|
||||
POSTGRESQL_DB: gogs
|
||||
POSTGRESQL_USER: gogs
|
||||
POSTGRESQL_PASS: password
|
||||
3
docker/blocks/option_session_mysql/config
Normal file
3
docker/blocks/option_session_mysql/config
Normal file
@@ -0,0 +1,3 @@
|
||||
[session]
|
||||
PROVIDER = mysql
|
||||
PROVIDER_CONFIG = ${SESSION_1_ENV_MYSQL_USER}:${SESSION_1_ENV_MYSQL_PASSWORD}@SESSION_1_PORT_3306_TCP_PROTO(${SESSION_1_PORT_3306_TCP_ADDR}:${SESSION_1_PORT_3306_TCP_PORT})/${SESSION_1_ENV_MYSQL_DATABASE}
|
||||
7
docker/blocks/option_session_mysql/fig
Normal file
7
docker/blocks/option_session_mysql/fig
Normal file
@@ -0,0 +1,7 @@
|
||||
session:
|
||||
image: mysql:latest
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: rootpass
|
||||
MYSQL_DATABASE: gogs_session
|
||||
MYSQL_USER: gogs
|
||||
MYSQL_PASSWORD: password
|
||||
6
docker/blocks/w_cache/fig
Normal file
6
docker/blocks/w_cache/fig
Normal file
@@ -0,0 +1,6 @@
|
||||
gogs:
|
||||
build: docker
|
||||
links:
|
||||
- cache
|
||||
ports:
|
||||
- "3000:3000"
|
||||
7
docker/blocks/w_cache_session/fig
Normal file
7
docker/blocks/w_cache_session/fig
Normal file
@@ -0,0 +1,7 @@
|
||||
gogs:
|
||||
build: docker
|
||||
links:
|
||||
- cache
|
||||
- session
|
||||
ports:
|
||||
- "3000:3000"
|
||||
6
docker/blocks/w_db/fig
Normal file
6
docker/blocks/w_db/fig
Normal file
@@ -0,0 +1,6 @@
|
||||
gogs:
|
||||
build: docker
|
||||
links:
|
||||
- db
|
||||
ports:
|
||||
- "3000:3000"
|
||||
7
docker/blocks/w_db_cache/fig
Normal file
7
docker/blocks/w_db_cache/fig
Normal file
@@ -0,0 +1,7 @@
|
||||
gogs:
|
||||
build: docker
|
||||
links:
|
||||
- db
|
||||
- cache
|
||||
ports:
|
||||
- "3000:3000"
|
||||
8
docker/blocks/w_db_cache_session/fig
Normal file
8
docker/blocks/w_db_cache_session/fig
Normal file
@@ -0,0 +1,8 @@
|
||||
gogs:
|
||||
build: docker
|
||||
links:
|
||||
- db
|
||||
- cache
|
||||
- session
|
||||
ports:
|
||||
- "3000:3000"
|
||||
7
docker/blocks/w_db_session/fig
Normal file
7
docker/blocks/w_db_session/fig
Normal file
@@ -0,0 +1,7 @@
|
||||
gogs:
|
||||
build: docker
|
||||
links:
|
||||
- db
|
||||
- session
|
||||
ports:
|
||||
- "3000:3000"
|
||||
4
docker/blocks/w_none/fig
Normal file
4
docker/blocks/w_none/fig
Normal file
@@ -0,0 +1,4 @@
|
||||
gogs:
|
||||
build: docker
|
||||
ports:
|
||||
- "3000:3000"
|
||||
6
docker/blocks/w_session/fig
Normal file
6
docker/blocks/w_session/fig
Normal file
@@ -0,0 +1,6 @@
|
||||
gogs:
|
||||
build: docker
|
||||
links:
|
||||
- session
|
||||
ports:
|
||||
- "3000:3000"
|
||||
12
docker/templates/init_gogs.sh.tpl
Normal file
12
docker/templates/init_gogs.sh.tpl
Normal file
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ ! -d "$DIRECTORY" ]; then
|
||||
mkdir -p $GOGS_CUSTOM_CONF_PATH
|
||||
|
||||
echo "
|
||||
{{ CONFIG }}
|
||||
" >> $GOGS_CUSTOM_CONF
|
||||
|
||||
fi
|
||||
|
||||
exec "$@"
|
||||
@@ -1,40 +0,0 @@
|
||||
### Install Gogs With Docker
|
||||
|
||||
Deploying gogs in [Docker](http://www.docker.io/) is just as easy as eating a pie, what you do is just open the `dockerfiles/build.sh` file, replace the configs:
|
||||
|
||||
```
|
||||
DB_TYPE="YOUR_DB_TYPE" # type of database, support 'mysql' and 'postgres'
|
||||
MEM_TYPE="YOUR_MEM_TYPE" # type of memory database, support 'redis' and 'memcache'
|
||||
DB_PASSWORD="YOUR_DB_PASSWORD" # The database password.
|
||||
DB_RUN_NAME="YOUR_DB_RUN_NAME" # The --name option value when run the database image.
|
||||
MEM_RUN_NAME="YOUR_MEM_RUN_NAME" # The --name option value when run the mem database image.
|
||||
HOST_PORT="YOUR_HOST_PORT" # The port on host, which will be redirected to the port 3000 inside gogs container.
|
||||
```
|
||||
|
||||
And run:
|
||||
```
|
||||
cd dockerfiles
|
||||
./build.sh
|
||||
```
|
||||
|
||||
The build might take some time, just be paient. After it finishes, you will receive the message:
|
||||
|
||||
```
|
||||
Now we have the MySQL image(running) and gogs image, use the follow command to start gogs service( the content might be different, according to your own configs):
|
||||
docker run -i -t --link YOUR_DB_RUN_NAME:db --link YOUR_MEM_RUN_NAME:mem -p YOUR_HOST_PORT:3000 gogits/gogs
|
||||
```
|
||||
|
||||
Just follow the message, run:
|
||||
|
||||
```
|
||||
docker run -i -t --link YOUR_DB_RUN_NAME:db --link YOUR_MEM_RUN_NAME:mem -p YOUR_HOST_PORT:3000 gogits/gogs
|
||||
```
|
||||
|
||||
Now we have gogs running! Open the browser and navigate to:
|
||||
|
||||
```
|
||||
http://YOUR_HOST_IP:YOUR_HOST_PORT
|
||||
```
|
||||
|
||||
Let's 'gogs'!
|
||||
Ouya~
|
||||
@@ -1,68 +0,0 @@
|
||||
# Configs of the docker images, you might have specify your own configs here.
|
||||
|
||||
DB_TYPE="YOUR_DB_TYPE" # type of database, support 'mysql' and 'postgres'
|
||||
MEM_TYPE="YOUR_MEM_TYPE" # type of memory database, support 'redis' and 'memcache'
|
||||
DB_PASSWORD="YOUR_DB_PASSWORD" # The database password.
|
||||
DB_RUN_NAME="YOUR_DB_RUN_NAME" # The --name option value when run the database image.
|
||||
MEM_RUN_NAME="YOUR_MEM_RUN_NAME" # The --name option value when run the mem database image.
|
||||
HOST_PORT="YOUR_HOST_PORT" # The port on host, which will be redirected to the port 3000 inside gogs container.
|
||||
|
||||
# apt source, you can select 'nchc'(mirror in Taiwan) or 'aliyun'(best for mainlance China users) according to your network, if you could connect to the official unbunt mirror in a fast speed, just leave it to "".
|
||||
APT_SOURCE=""
|
||||
|
||||
# Replace the database root password in database image Dockerfile.
|
||||
sed -i "s/THE_DB_PASSWORD/$DB_PASSWORD/g" images/$DB_TYPE/Dockerfile
|
||||
# Replace the database root password in gogits image deploy.sh file.
|
||||
sed -i "s/THE_DB_PASSWORD/$DB_PASSWORD/g" images/gogits/deploy.sh
|
||||
# Replace the apt source in gogits image Dockerfile.
|
||||
sed -i "s/#$APT_SOURCE#//" images/gogits/Dockerfile
|
||||
# Uncomment the installation of database lib in gogs Dockerfile
|
||||
sed -i "s/#$DB_TYPE#//" images/gogits/Dockerfile
|
||||
# Replace the database type in gogits image deploy.sh file.
|
||||
sed -i "s/THE_DB_TYPE/$DB_TYPE/g" images/gogits/deploy.sh
|
||||
|
||||
if [ $MEM_TYPE != "" ]
|
||||
then
|
||||
# Replace the mem configs in deploy.sh
|
||||
sed -i "s/THE_MEM_TYPE/$MEM_TYPE/g" images/gogits/deploy.sh
|
||||
# Uncomment the installation of go mem lib
|
||||
sed -i "s/#$MEM_TYPE#//" images/gogits/Dockerfile
|
||||
|
||||
# Add the tags when get gogs
|
||||
sed -i "s#RUN go get -u -d github.com/gogits/gogs#RUN go get -u -d -tags $MEM_TYPE github.com/gogits/gogs#g" images/gogits/Dockerfile
|
||||
# Append the tag in gogs build
|
||||
GOGS_BUILD_LINE=`awk '$0 ~ str{print NR}' str="go build" images/gogits/Dockerfile`
|
||||
# Append the build tags
|
||||
sed -i "${GOGS_BUILD_LINE}s/$/ -tags $MEM_TYPE/" images/gogits/Dockerfile
|
||||
|
||||
cd images/$MEM_TYPE
|
||||
docker build -t gogits/$MEM_TYPE .
|
||||
docker run -d --name $MEM_RUN_NAME gogits/$MEM_TYPE
|
||||
MEM_LINK=" --link $MEM_RUN_NAME:mem "
|
||||
cd ../../
|
||||
fi
|
||||
|
||||
# Build the database image
|
||||
cd images/$DB_TYPE
|
||||
docker build -t gogits/$DB_TYPE .
|
||||
#
|
||||
|
||||
|
||||
## Build the gogits image
|
||||
cd ../gogits
|
||||
|
||||
docker build -t gogits/gogs .
|
||||
|
||||
#sed -i "s#RUN go get -u -tags $MEM_TYPE github.com/gogits/gogs#RUN go get -u github.com/gogits/gogs#g" Dockerfile
|
||||
|
||||
# Remove the appended tags in go build line(if there is any)
|
||||
sed -i "s/ -tags $MEM_TYPE//" Dockerfile
|
||||
|
||||
#
|
||||
## Run MySQL image with name
|
||||
docker run -d --name $DB_RUN_NAME gogits/$DB_TYPE
|
||||
#
|
||||
## Run gogits image and link it to the database image
|
||||
echo "Now we have the $DB_TYPE image(running) and gogs image, use the follow command to start gogs service:"
|
||||
echo -e "\033[33m docker run -i -t --link $DB_RUN_NAME:db $MEM_LINK -p $HOST_PORT:3000 gogits/gogs \033[0m"
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
# Configs of the docker images, you might have specify your own configs here.
|
||||
# type of database, support 'mysql' and 'postgres'
|
||||
DB_TYPE="postgres"
|
||||
DB_PASSWORD="YOUR_DB_PASSWORD"
|
||||
DB_RUN_NAME="YOUR_DB_RUN_NAME"
|
||||
HOST_PORT="YOUR_HOST_PORT"
|
||||
|
||||
# Replace the database root password in database image Dockerfile.
|
||||
sed -i "s/THE_DB_PASSWORD/$DB_PASSWORD/g" images/$DB_TYPE/Dockerfile
|
||||
# Replace the database root password in gogits image deploy.sh file.
|
||||
sed -i "s/THE_DB_PASSWORD/$DB_PASSWORD/g" images/gogits/deploy.sh
|
||||
# Replace the database type in gogits image deploy.sh file.
|
||||
sed -i "s/THE_DB_TYPE/$DB_TYPE/g" images/gogits/deploy.sh
|
||||
|
||||
# Build the database image
|
||||
cd images/$DB_TYPE
|
||||
docker build -t gogs/$DB_TYPE .
|
||||
#
|
||||
## Build the gogits image
|
||||
cd ../gogits
|
||||
docker build -t gogs/gogits .
|
||||
#
|
||||
## Run MySQL image with name
|
||||
docker run -d --name $DB_RUN_NAME gogs/$DB_TYPE
|
||||
#
|
||||
## Run gogits image and link it to the database image
|
||||
echo "Now we have the $DB_TYPE image(running) and gogs image, use the follow command to start gogs service:"
|
||||
echo -e "\033[33m docker run -i -t --link $DB_RUN_NAME:db -p $HOST_PORT:3000 gogs/gogits \033[0m"
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
FROM stackbrew/ubuntu:13.10
|
||||
MAINTAINER Meaglith Ma <genedna@gmail.com> (@genedna)
|
||||
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
#aliyun#RUN echo "deb http://mirrors.aliyun.com/ubuntu/ saucy main restricted" > /etc/apt/sources.list && echo "deb http://mirrors.aliyun.com/ubuntu/ saucy-updates main restricted" >> /etc/apt/sources.list && echo "deb http://mirrors.aliyun.com/ubuntu/ saucy universe" >> /etc/apt/sources.list && echo "deb http://mirrors.aliyun.com/ubuntu/ saucy-updates universe" >> /etc/apt/sources.list && echo "deb http://mirrors.aliyun.com/ubuntu/ saucy multiverse" >> /etc/apt/sources.list && echo "deb http://mirrors.aliyun.com/ubuntu/ saucy-updates multiverse" >> /etc/apt/sources.list && echo "deb http://mirrors.aliyun.com/ubuntu/ saucy-backports main restricted universe multiverse" >> /etc/apt/sources.list && echo "deb http://mirrors.aliyun.com/ubuntu/ saucy-security main restricted" >> /etc/apt/sources.list && echo "deb http://mirrors.aliyun.com/ubuntu/ saucy-security universe" >> /etc/apt/sources.list && echo "deb http://mirrors.aliyun.com/ubuntu/ saucy-security multiverse" >> /etc/apt/sources.list
|
||||
|
||||
#nchc#RUN echo "deb http://free.nchc.org.tw/ubuntu/ saucy main restricted" >> /etc/apt/source.list && echo "deb-src http://free.nchc.org.tw/ubuntu/ saucy main restricted" >> /etc/apt/source.list && echo "deb http://free.nchc.org.tw/ubuntu/ saucy-updates main restricted" >> /etc/apt/source.list && echo "deb-src http://free.nchc.org.tw/ubuntu/ saucy-updates main restricted" >> /etc/apt/source.list && echo "deb http://free.nchc.org.tw/ubuntu/ saucy universe" >> /etc/apt/source.list && echo "deb-src http://free.nchc.org.tw/ubuntu/ saucy universe" >> /etc/apt/source.list && echo "deb http://free.nchc.org.tw/ubuntu/ saucy-updates universe" >> /etc/apt/source.list && echo "deb-src http://free.nchc.org.tw/ubuntu/ saucy-updates universe" >> /etc/apt/source.list && echo "deb http://free.nchc.org.tw/ubuntu/ saucy multiverse" >> /etc/apt/source.list && echo "deb-src http://free.nchc.org.tw/ubuntu/ saucy multiverse" >> /etc/apt/source.list && echo "deb http://free.nchc.org.tw/ubuntu/ saucy-updates multiverse" >> /etc/apt/source.list && echo "deb-src http://free.nchc.org.tw/ubuntu/ saucy-updates multiverse" >> /etc/apt/source.list && echo "deb http://free.nchc.org.tw/ubuntu/ saucy-backports main restricted universe multiverse" >> /etc/apt/source.list && echo "deb-src http://free.nchc.org.tw/ubuntu/ saucy-backports main restricted universe multiverse" >> /etc/apt/source.list && echo "deb http://free.nchc.org.tw/ubuntu/ saucy-security main restricted" >> /etc/apt/source.list && echo "deb-src http://free.nchc.org.tw/ubuntu/ saucy-security main restricted" >> /etc/apt/source.list && echo "deb http://free.nchc.org.tw/ubuntu/ saucy-security universe" >> /etc/apt/source.list && echo "deb-src http://free.nchc.org.tw/ubuntu/ saucy-security universe" >> /etc/apt/source.list && echo "deb http://free.nchc.org.tw/ubuntu/ saucy-security multiverse" >> /etc/apt/source.list && echo "deb-src http://free.nchc.org.tw/ubuntu/ saucy-security multiverse" >> /etc/apt/source.list && echo "deb http://extras.ubuntu.com/ubuntu saucy main" >> /etc/apt/source.list && echo "deb-src http://extras.ubuntu.com/ubuntu saucy main" >> /etc/apt/source.list
|
||||
|
||||
RUN mkdir -p /go
|
||||
ENV PATH /usr/local/go/bin:/go/bin:$PATH
|
||||
ENV GOROOT /usr/local/go
|
||||
ENV GOPATH /go
|
||||
|
||||
RUN apt-get update && apt-get install --yes --force-yes curl git mercurial zip wget ca-certificates build-essential
|
||||
RUN apt-get install -yq vim sudo
|
||||
|
||||
RUN curl -s http://docker.u.qiniudn.com/go1.2.1.src.tar.gz | tar -v -C /usr/local -xz
|
||||
RUN cd /usr/local/go/src && ./make.bash --no-clean 2>&1
|
||||
|
||||
RUN go get -u -d github.com/gogits/gogs
|
||||
RUN cd $GOPATH/src/github.com/gogits/gogs && git checkout dev && git pull origin dev && go install && go build -tags redis
|
||||
|
||||
# Clean all the unused packages
|
||||
RUN apt-get autoremove -y
|
||||
RUN apt-get clean all
|
||||
|
||||
# Add the deploy script to the docker image and assign execution permission to it.
|
||||
ADD ./deploy.sh /
|
||||
RUN chmod +x deploy.sh
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
CMD /deploy.sh
|
||||
@@ -1,60 +0,0 @@
|
||||
# deploy.sh in gogits image, replace the configs and run gogs
|
||||
|
||||
## Replace the database password
|
||||
DB_TYPE=THE_DB_TYPE
|
||||
DB_PASSWORD=THE_DB_PASSWORD
|
||||
DB_ALIAS=DB
|
||||
MEM_TYPE=THE_MEM_TYPE
|
||||
|
||||
DB_TYPE_LINE=`awk '$0 ~ str{print NR}' str="DB_TYPE = mysql" $GOPATH/src/github.com/gogits/gogs/conf/app.ini`
|
||||
DB_PASSWORD_LINE=`awk '$0 ~ str{print NR+1}' str="USER = root" $GOPATH/src/github.com/gogits/gogs/conf/app.ini`
|
||||
|
||||
sed -i "${DB_TYPE_LINE}s/.*$/DB_TYPE = $DB_TYPE/g" $GOPATH/src/github.com/gogits/gogs/conf/app.ini
|
||||
sed -i "${DB_PASSWORD_LINE}s/.*$/PASSWD = $DB_PASSWORD/g" $GOPATH/src/github.com/gogits/gogs/conf/app.ini
|
||||
|
||||
|
||||
|
||||
if [ $MEM_TYPE != "" ]
|
||||
then
|
||||
MEM_HOST_LINE=`awk '$0 ~ str{print NR+6}' str="ADAPTER = memory" $GOPATH/src/github.com/gogits/gogs/conf/app.ini`
|
||||
|
||||
_MEM_ADDR=`echo $MEM_PORT | cut -d '/' -f 3 | cut -d ':' -f 1`
|
||||
_MEM_PORT=`echo $MEM_PORT | cut -d '/' -f 3 | cut -d ':' -f 2`
|
||||
|
||||
# take advantage of memory db for adapter and provider
|
||||
sed -i "s/ADAPTER = memory/ADAPTER = $MEM_TYPE/g" $GOPATH/src/github.com/gogits/gogs/conf/app.ini
|
||||
# Comment the memory interval since we don't use 'memory' as adapter
|
||||
sed -i "s/INTERVAL = 60/;INTERVAL = 60/g" $GOPATH/src/github.com/gogits/gogs/conf/app.ini
|
||||
|
||||
|
||||
case $MEM_TYPE in
|
||||
"redis")
|
||||
# Modify the adapter host
|
||||
sed -i "${MEM_HOST_LINE}s/.*/HOST = $_MEM_ADDR:$_MEM_PORT/" $GOPATH/src/github.com/gogits/gogs/conf/app.ini
|
||||
sed -i "s/PROVIDER = file/PROVIDER = $MEM_TYPE/g" $GOPATH/src/github.com/gogits/gogs/conf/app.ini
|
||||
# Modify the provider config
|
||||
sed -i "s#PROVIDER_CONFIG = data/sessions#PROVIDER_CONFIG = $_MEM_ADDR:$_MEM_PORT#g" $GOPATH/src/github.com/gogits/gogs/conf/app.ini
|
||||
;;
|
||||
|
||||
"memcache")
|
||||
# Modify the adapter host
|
||||
sed -i "${MEM_HOST_LINE}s/.*/HOST = $_MEM_ADDR:$_MEM_PORT/" $GOPATH/src/github.com/gogits/gogs/conf/app.ini
|
||||
;;
|
||||
esac
|
||||
|
||||
fi
|
||||
|
||||
|
||||
## Replace the database address and port
|
||||
# When using --link in docker run, the database image's info looks like this:
|
||||
# DB_PORT=tcp://172.17.0.2:3306
|
||||
# DB_PORT_3306_TCP_PORT=3306
|
||||
# DB_PORT_3306_TCP_PROTO=tcp
|
||||
# DB_PORT_3306_TCP_ADDR=172.17.0.2
|
||||
#sed -i "/HOST = 127.0.0.1:3306/c\HOST = $DB_PORT_3306_TCP_ADDR:$DB_PORT_3306_TCP_PORT" $GOPATH/src/github.com/gogits/gogs/conf/app.ini
|
||||
sed -i "/HOST = 127.0.0.1:3306/c\HOST = `echo $DB_PORT | cut -d '/' -f 3`" $GOPATH/src/github.com/gogits/gogs/conf/app.ini
|
||||
|
||||
cd $GOPATH/src/github.com/gogits/gogs/
|
||||
|
||||
# The sudo is a must here, or the go within docker container won't get the current user by os.Getenv("USERNAME")
|
||||
sudo ./gogs web
|
||||
@@ -1,26 +0,0 @@
|
||||
FROM ubuntu
|
||||
|
||||
# Set the file maintainer (your name - the file's author)
|
||||
MAINTAINER Borja Burgos <borja@tutum.co>
|
||||
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
# Update the default application repository sources list
|
||||
RUN apt-get update
|
||||
|
||||
# Install Memcached
|
||||
RUN apt-get install -y memcached
|
||||
|
||||
# Port to expose (default: 11211)
|
||||
EXPOSE 11211
|
||||
|
||||
# Default Memcached run command arguments
|
||||
# Change to limit memory when creating container in Tutum
|
||||
CMD ["-m", "64"]
|
||||
|
||||
# Set the user to run Memcached daemon
|
||||
USER daemon
|
||||
|
||||
# Set the entrypoint to memcached binary
|
||||
ENTRYPOINT memcached
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
#FROM stackbrew/ubuntu:13.10
|
||||
#FROM stackbrew/ubuntu
|
||||
FROM stackbrew/ubuntu:saucy
|
||||
MAINTAINER Meaglith Ma <genedna@gmail.com> (@genedna)
|
||||
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
RUN apt-get install -y --force-yes software-properties-common
|
||||
RUN add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe"
|
||||
RUN apt-get --yes --force-yes update
|
||||
RUN apt-get --yes --force-yes upgrade
|
||||
|
||||
ENV MYSQL_PASSWORD THE_DB_PASSWORD
|
||||
|
||||
RUN echo "mysql-server mysql-server/root_password password $MYSQL_PASSWORD" | debconf-set-selections
|
||||
RUN echo "mysql-server mysql-server/root_password_again password $MYSQL_PASSWORD" | debconf-set-selections
|
||||
|
||||
RUN apt-get update && apt-get install -y --force-yes mysql-server
|
||||
RUN sed -i -e"s/^bind-address\s*=\s*127.0.0.1/bind-address = 0.0.0.0/" /etc/mysql/my.cnf
|
||||
|
||||
RUN service mysql restart
|
||||
|
||||
RUN echo "mysql -uroot -p$MYSQL_PASSWORD -e 'drop database if exists gogs;'" >> import.sh
|
||||
RUN echo "mysql -uroot -p$MYSQL_PASSWORD -e 'create database gogs;'" >> import.sh
|
||||
RUN chmod +x import.sh
|
||||
|
||||
RUN apt-get autoremove -y
|
||||
RUN apt-get clean all
|
||||
|
||||
RUN /usr/sbin/mysqld & \
|
||||
sleep 10s &&\
|
||||
echo "GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '$MYSQL_PASSWORD' WITH GRANT OPTION; FLUSH PRIVILEGES" | mysql -p$MYSQL_PASSWORD &&\
|
||||
./import.sh
|
||||
|
||||
EXPOSE 3306
|
||||
|
||||
CMD ["/usr/bin/mysqld_safe", "--skip-syslog", "--log-error=/dev/null"]
|
||||
@@ -1,52 +0,0 @@
|
||||
FROM ubuntu
|
||||
MAINTAINER SvenDowideit@docker.com
|
||||
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
# Add the PostgreSQL PGP key to verify their Debian packages.
|
||||
# It should be the same key as https://www.postgresql.org/media/keys/ACCC4CF8.asc
|
||||
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8
|
||||
|
||||
# Add PostgreSQL's repository. It contains the most recent stable release
|
||||
# of PostgreSQL, ``9.3``.
|
||||
# See http://apt.postgresql.org/pub/repos/apt/README
|
||||
RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list
|
||||
|
||||
# Update the Ubuntu and PostgreSQL repository indexes
|
||||
RUN apt-get update
|
||||
|
||||
# Install ``python-software-properties``, ``software-properties-common`` and PostgreSQL 9.3
|
||||
# There are some warnings (in red) that show up during the build. You can hide
|
||||
# them by prefixing each apt-get statement with DEBIAN_FRONTEND=noninteractive
|
||||
RUN apt-get -y -q install python-software-properties software-properties-common
|
||||
RUN apt-get -y -q install postgresql-9.3 postgresql-client-9.3 postgresql-contrib-9.3
|
||||
|
||||
# Note: The official Debian and Ubuntu images automatically ``apt-get clean``
|
||||
# after each ``apt-get``
|
||||
|
||||
# Run the rest of the commands as the ``postgres`` user created by the ``postgres-9.3`` package when it was ``apt-get installed``
|
||||
USER postgres
|
||||
|
||||
# Create a PostgreSQL role named ``docker`` with ``docker`` as the password and
|
||||
# then create a database `docker` owned by the ``docker`` role.
|
||||
# Note: here we use ``&&\`` to run commands one after the other - the ``\``
|
||||
# allows the RUN command to span multiple lines.
|
||||
RUN /etc/init.d/postgresql start &&\
|
||||
psql --command "CREATE USER root WITH SUPERUSER PASSWORD 'THE_DB_PASSWORD';" &&\
|
||||
createdb -O root gogs
|
||||
|
||||
# Adjust PostgreSQL configuration so that remote connections to the
|
||||
# database are possible.
|
||||
RUN echo "host all all 0.0.0.0/0 md5" >> /etc/postgresql/9.3/main/pg_hba.conf
|
||||
|
||||
# And add ``listen_addresses`` to ``/etc/postgresql/9.3/main/postgresql.conf``
|
||||
RUN echo "listen_addresses='*'" >> /etc/postgresql/9.3/main/postgresql.conf
|
||||
|
||||
# Expose the PostgreSQL port
|
||||
EXPOSE 5432
|
||||
|
||||
# Add VOLUMEs to allow backup of config, logs and databases
|
||||
VOLUME ["/etc/postgresql", "/var/log/postgresql", "/var/lib/postgresql"]
|
||||
|
||||
# Set the default command to run when starting the container
|
||||
CMD ["/usr/lib/postgresql/9.3/bin/postgres", "-D", "/var/lib/postgresql/9.3/main", "-c", "config_file=/etc/postgresql/9.3/main/postgresql.conf"]
|
||||
@@ -1,12 +0,0 @@
|
||||
FROM stackbrew/ubuntu:saucy
|
||||
MAINTAINER Meaglith Ma <genedna@gmail.com> (@genedna), Lance Ju <juzhenatpku@gmail.com> (@crystaldust)
|
||||
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
RUN apt-get update && apt-get install -y redis-server
|
||||
# Usually redis doesn't need a password
|
||||
#RUN sed -i "s/# requirepass foobared/requirepass THE_REDIS_PASSWORD/g" /etc/redis/redis.conf
|
||||
EXPOSE 6379
|
||||
ENTRYPOINT ["/usr/bin/redis-server"]
|
||||
CMD ["--bind", "0.0.0.0"]
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
# Configs
|
||||
MYSQL_PASSWORD="kuajie8402"
|
||||
MYSQL_RUN_NAME="gogs_mysql"
|
||||
typeset -u MYSQL_ALIAS
|
||||
MYSQL_ALIAS="db"
|
||||
HOST_PORT="3000"
|
||||
|
||||
## Run MySQL image with name
|
||||
docker run -d --name $MYSQL_RUN_NAME gogs/mysql
|
||||
#
|
||||
## Run gogits image and link it to the MySQL image
|
||||
docker run --link $MYSQL_RUN_NAME:$MYSQL_ALIAS -p $HOST_PORT:3000 gogs/gogits
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
DROP DATABASE gogs;
|
||||
CREATE DATABASE IF NOT EXISTS gogs CHARACTER SET utf8 COLLATE utf8_general_ci;
|
||||
DROP DATABASE IF EXISTS gogs;
|
||||
CREATE DATABASE IF NOT EXISTS gogs CHARACTER SET utf8 COLLATE utf8_general_ci;
|
||||
26
etc/supervisord.conf
Normal file
26
etc/supervisord.conf
Normal file
@@ -0,0 +1,26 @@
|
||||
[unix_http_server]
|
||||
file=log/supervisor.sock ; path to your socket file
|
||||
|
||||
[supervisord]
|
||||
logfile=log/supervisord.log ; supervisord log file
|
||||
logfile_maxbytes=50MB ; maximum size of logfile before rotation
|
||||
logfile_backups=10 ; number of backed up logfiles
|
||||
loglevel=warn ; info, debug, warn, trace
|
||||
pidfile=log/supervisord.pid ; pidfile location
|
||||
nodaemon=false ; run supervisord as a daemon
|
||||
minfds=1024 ; number of startup file descriptors
|
||||
minprocs=200 ; number of process descriptors
|
||||
user=root ; default user
|
||||
childlogdir=log
|
||||
|
||||
[rpcinterface:supervisor]
|
||||
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
|
||||
|
||||
[supervisorctl]
|
||||
serverurl=unix://log/supervisor.sock ; use a unix:// URL for a unix socket
|
||||
|
||||
[program:gogs]
|
||||
command = gogs_start
|
||||
autostart = true
|
||||
stdout_logfile = log/supervisor-gogs-out.log
|
||||
stderr_logfile = log/supervisor-gogs-err.log
|
||||
21
gogs.go
21
gogs.go
@@ -4,7 +4,7 @@
|
||||
// Use of this source code is governed by a MIT-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// Gogs(Go Git Service) is a Self Hosted Git Service in the Go Programming Language.
|
||||
// Gogs(Go Git Service) is a painless self-hosted Git Service written in Go.
|
||||
package main
|
||||
|
||||
import (
|
||||
@@ -13,17 +13,15 @@ import (
|
||||
|
||||
"github.com/codegangsta/cli"
|
||||
|
||||
"github.com/gogits/gogs/modules/base"
|
||||
"github.com/gogits/gogs/cmd"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
)
|
||||
|
||||
// Test that go1.2 tag above is included in builds. main.go refers to this definition.
|
||||
const go12tag = true
|
||||
|
||||
const APP_VER = "0.3.1.0427 Alpha"
|
||||
const APP_VER = "0.5.9.1213 Beta"
|
||||
|
||||
func init() {
|
||||
base.AppVer = APP_VER
|
||||
runtime.GOMAXPROCS(runtime.NumCPU())
|
||||
setting.AppVer = APP_VER
|
||||
}
|
||||
|
||||
func main() {
|
||||
@@ -32,9 +30,12 @@ func main() {
|
||||
app.Usage = "Go Git Service"
|
||||
app.Version = APP_VER
|
||||
app.Commands = []cli.Command{
|
||||
CmdWeb,
|
||||
CmdServ,
|
||||
CmdUpdate,
|
||||
cmd.CmdWeb,
|
||||
cmd.CmdServ,
|
||||
cmd.CmdUpdate,
|
||||
cmd.CmdFix,
|
||||
cmd.CmdDump,
|
||||
cmd.CmdCert,
|
||||
}
|
||||
app.Flags = append(app.Flags, []cli.Flag{}...)
|
||||
app.Run(os.Args)
|
||||
|
||||
@@ -11,26 +11,27 @@ import (
|
||||
"github.com/go-xorm/xorm"
|
||||
)
|
||||
|
||||
// Access types.
|
||||
type AccessType int
|
||||
|
||||
const (
|
||||
AU_READABLE = iota + 1
|
||||
AU_WRITABLE
|
||||
READABLE AccessType = iota + 1
|
||||
WRITABLE
|
||||
)
|
||||
|
||||
// Access represents the accessibility of user to repository.
|
||||
type Access struct {
|
||||
Id int64
|
||||
UserName string `xorm:"unique(s)"`
|
||||
RepoName string `xorm:"unique(s)"` // <user name>/<repo name>
|
||||
Mode int `xorm:"unique(s)"`
|
||||
Created time.Time `xorm:"created"`
|
||||
UserName string `xorm:"UNIQUE(s)"`
|
||||
RepoName string `xorm:"UNIQUE(s)"` // <user name>/<repo name>
|
||||
Mode AccessType `xorm:"UNIQUE(s)"`
|
||||
Created time.Time `xorm:"CREATED"`
|
||||
}
|
||||
|
||||
// AddAccess adds new access record.
|
||||
func AddAccess(access *Access) error {
|
||||
access.UserName = strings.ToLower(access.UserName)
|
||||
access.RepoName = strings.ToLower(access.RepoName)
|
||||
_, err := orm.Insert(access)
|
||||
_, err := x.Insert(access)
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -38,7 +39,13 @@ func AddAccess(access *Access) error {
|
||||
func UpdateAccess(access *Access) error {
|
||||
access.UserName = strings.ToLower(access.UserName)
|
||||
access.RepoName = strings.ToLower(access.RepoName)
|
||||
_, err := orm.Id(access.Id).Update(access)
|
||||
_, err := x.Id(access.Id).Update(access)
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteAccess deletes access record.
|
||||
func DeleteAccess(access *Access) error {
|
||||
_, err := x.Delete(access)
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -52,12 +59,16 @@ func UpdateAccessWithSession(sess *xorm.Session, access *Access) error {
|
||||
}
|
||||
|
||||
// HasAccess returns true if someone can read or write to given repository.
|
||||
func HasAccess(userName, repoName string, mode int) (bool, error) {
|
||||
// The repoName should be in format <username>/<reponame>.
|
||||
func HasAccess(uname, repoName string, mode AccessType) (bool, error) {
|
||||
if len(repoName) == 0 {
|
||||
return false, nil
|
||||
}
|
||||
access := &Access{
|
||||
UserName: strings.ToLower(userName),
|
||||
UserName: strings.ToLower(uname),
|
||||
RepoName: strings.ToLower(repoName),
|
||||
}
|
||||
has, err := orm.Get(access)
|
||||
has, err := x.Get(access)
|
||||
if err != nil {
|
||||
return false, err
|
||||
} else if !has {
|
||||
|
||||
366
models/action.go
366
models/action.go
@@ -6,46 +6,70 @@ package models
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"path"
|
||||
"regexp"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/gogits/git"
|
||||
"unicode"
|
||||
|
||||
"github.com/gogits/gogs/modules/base"
|
||||
"github.com/gogits/gogs/modules/git"
|
||||
"github.com/gogits/gogs/modules/log"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
)
|
||||
|
||||
// Operation types of user action.
|
||||
type ActionType int
|
||||
|
||||
const (
|
||||
OP_CREATE_REPO = iota + 1
|
||||
OP_DELETE_REPO
|
||||
OP_STAR_REPO
|
||||
OP_FOLLOW_REPO
|
||||
OP_COMMIT_REPO
|
||||
OP_CREATE_ISSUE
|
||||
OP_PULL_REQUEST
|
||||
OP_TRANSFER_REPO
|
||||
OP_PUSH_TAG
|
||||
CREATE_REPO ActionType = iota + 1 // 1
|
||||
DELETE_REPO // 2
|
||||
STAR_REPO // 3
|
||||
FOLLOW_REPO // 4
|
||||
COMMIT_REPO // 5
|
||||
CREATE_ISSUE // 6
|
||||
PULL_REQUEST // 7
|
||||
TRANSFER_REPO // 8
|
||||
PUSH_TAG // 9
|
||||
COMMENT_ISSUE // 10
|
||||
)
|
||||
|
||||
var (
|
||||
ErrNotImplemented = errors.New("Not implemented yet")
|
||||
)
|
||||
|
||||
var (
|
||||
// Same as Github. See https://help.github.com/articles/closing-issues-via-commit-messages
|
||||
IssueKeywords = []string{"close", "closes", "closed", "fix", "fixes", "fixed", "resolve", "resolves", "resolved"}
|
||||
IssueKeywordsPat *regexp.Regexp
|
||||
)
|
||||
|
||||
func init() {
|
||||
IssueKeywordsPat = regexp.MustCompile(fmt.Sprintf(`(?i)(?:%s) \S+`, strings.Join(IssueKeywords, "|")))
|
||||
}
|
||||
|
||||
// Action represents user operation type and other information to repository.,
|
||||
// it implemented interface base.Actioner so that can be used in template render.
|
||||
type Action struct {
|
||||
Id int64
|
||||
UserId int64 // Receiver user id.
|
||||
OpType int // Operations: CREATE DELETE STAR ...
|
||||
ActUserId int64 // Action user id.
|
||||
ActUserName string // Action user name.
|
||||
ActEmail string
|
||||
RepoId int64
|
||||
RepoName string
|
||||
RefName string
|
||||
Content string `xorm:"TEXT"`
|
||||
Created time.Time `xorm:"created"`
|
||||
Id int64
|
||||
UserId int64 // Receiver user id.
|
||||
OpType ActionType
|
||||
ActUserId int64 // Action user id.
|
||||
ActUserName string // Action user name.
|
||||
ActEmail string
|
||||
ActAvatar string `xorm:"-"`
|
||||
RepoId int64
|
||||
RepoUserName string
|
||||
RepoName string
|
||||
RefName string
|
||||
IsPrivate bool `xorm:"NOT NULL DEFAULT false"`
|
||||
Content string `xorm:"TEXT"`
|
||||
Created time.Time `xorm:"created"`
|
||||
}
|
||||
|
||||
func (a Action) GetOpType() int {
|
||||
return a.OpType
|
||||
return int(a.OpType)
|
||||
}
|
||||
|
||||
func (a Action) GetActUserName() string {
|
||||
@@ -56,10 +80,18 @@ func (a Action) GetActEmail() string {
|
||||
return a.ActEmail
|
||||
}
|
||||
|
||||
func (a Action) GetRepoUserName() string {
|
||||
return a.RepoUserName
|
||||
}
|
||||
|
||||
func (a Action) GetRepoName() string {
|
||||
return a.RepoName
|
||||
}
|
||||
|
||||
func (a Action) GetRepoLink() string {
|
||||
return path.Join(a.RepoUserName, a.RepoName)
|
||||
}
|
||||
|
||||
func (a Action) GetBranch() string {
|
||||
return a.RefName
|
||||
}
|
||||
@@ -68,80 +100,290 @@ func (a Action) GetContent() string {
|
||||
return a.Content
|
||||
}
|
||||
|
||||
// CommitRepoAction adds new action for committing repository.
|
||||
func CommitRepoAction(userId int64, userName, actEmail string,
|
||||
repoId int64, repoName string, refName string, commit *base.PushCommits) error {
|
||||
// log.Trace("action.CommitRepoAction(start): %d/%s", userId, repoName)
|
||||
func (a Action) GetCreate() time.Time {
|
||||
return a.Created
|
||||
}
|
||||
|
||||
opType := OP_COMMIT_REPO
|
||||
func (a Action) GetIssueInfos() []string {
|
||||
return strings.SplitN(a.Content, "|", 2)
|
||||
}
|
||||
|
||||
func updateIssuesCommit(userId, repoId int64, repoUserName, repoName string, commits []*base.PushCommit) error {
|
||||
for _, c := range commits {
|
||||
refs := IssueKeywordsPat.FindAllString(c.Message, -1)
|
||||
|
||||
for _, ref := range refs {
|
||||
ref := ref[strings.IndexByte(ref, byte(' '))+1:]
|
||||
ref = strings.TrimRightFunc(ref, func(c rune) bool {
|
||||
return !unicode.IsDigit(c)
|
||||
})
|
||||
|
||||
if len(ref) == 0 {
|
||||
continue
|
||||
}
|
||||
|
||||
// Add repo name if missing
|
||||
if ref[0] == '#' {
|
||||
ref = fmt.Sprintf("%s/%s%s", repoUserName, repoName, ref)
|
||||
} else if strings.Contains(ref, "/") == false {
|
||||
// We don't support User#ID syntax yet
|
||||
// return ErrNotImplemented
|
||||
|
||||
continue
|
||||
}
|
||||
|
||||
issue, err := GetIssueByRef(ref)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
url := fmt.Sprintf("%s/%s/%s/commit/%s", setting.AppSubUrl, repoUserName, repoName, c.Sha1)
|
||||
message := fmt.Sprintf(`<a href="%s">%s</a>`, url, c.Message)
|
||||
|
||||
if _, err = CreateComment(userId, issue.RepoId, issue.Id, 0, 0, COMMIT, message, nil); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if issue.RepoId == repoId {
|
||||
if issue.IsClosed {
|
||||
continue
|
||||
}
|
||||
|
||||
issue.IsClosed = true
|
||||
|
||||
if err = UpdateIssue(issue); err != nil {
|
||||
return err
|
||||
} else if err = UpdateIssueUserPairsByStatus(issue.Id, issue.IsClosed); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err = ChangeMilestoneIssueStats(issue); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// If commit happened in the referenced repository, it means the issue can be closed.
|
||||
if _, err = CreateComment(userId, repoId, issue.Id, 0, 0, CLOSE, "", nil); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// CommitRepoAction adds new action for committing repository.
|
||||
func CommitRepoAction(userId, repoUserId int64, userName, actEmail string,
|
||||
repoId int64, repoUserName, repoName string, refFullName string, commit *base.PushCommits, oldCommitId string, newCommitId string) error {
|
||||
|
||||
opType := COMMIT_REPO
|
||||
// Check it's tag push or branch.
|
||||
if strings.HasPrefix(refName, "refs/tags/") {
|
||||
opType = OP_PUSH_TAG
|
||||
if strings.HasPrefix(refFullName, "refs/tags/") {
|
||||
opType = PUSH_TAG
|
||||
commit = &base.PushCommits{}
|
||||
}
|
||||
|
||||
refName = git.RefEndName(refName)
|
||||
repoLink := fmt.Sprintf("%s%s/%s", setting.AppUrl, repoUserName, repoName)
|
||||
// if not the first commit, set the compareUrl
|
||||
if !strings.HasPrefix(oldCommitId, "0000000") {
|
||||
commit.CompareUrl = fmt.Sprintf("%s/compare/%s...%s", repoLink, oldCommitId, newCommitId)
|
||||
}
|
||||
|
||||
bs, err := json.Marshal(commit)
|
||||
if err != nil {
|
||||
log.Error("action.CommitRepoAction(json): %d/%s", userId, repoName)
|
||||
return err
|
||||
return errors.New("action.CommitRepoAction(json): " + err.Error())
|
||||
}
|
||||
|
||||
if err = NotifyWatchers(&Action{ActUserId: userId, ActUserName: userName, ActEmail: actEmail,
|
||||
OpType: opType, Content: string(bs), RepoId: repoId, RepoName: repoName, RefName: refName}); err != nil {
|
||||
log.Error("action.CommitRepoAction(notify watchers): %d/%s", userId, repoName)
|
||||
return err
|
||||
}
|
||||
refName := git.RefEndName(refFullName)
|
||||
|
||||
// Change repository bare status and update last updated time.
|
||||
repo, err := GetRepositoryByName(userId, repoName)
|
||||
repo, err := GetRepositoryByName(repoUserId, repoName)
|
||||
if err != nil {
|
||||
log.Error("action.CommitRepoAction(GetRepositoryByName): %d/%s", userId, repoName)
|
||||
return err
|
||||
return errors.New("action.CommitRepoAction(GetRepositoryByName): " + err.Error())
|
||||
}
|
||||
repo.IsBare = false
|
||||
if err = UpdateRepository(repo); err != nil {
|
||||
log.Error("action.CommitRepoAction(UpdateRepository): %d/%s", userId, repoName)
|
||||
return err
|
||||
return errors.New("action.CommitRepoAction(UpdateRepository): " + err.Error())
|
||||
}
|
||||
|
||||
log.Trace("action.CommitRepoAction(end): %d/%s", userId, repoName)
|
||||
err = updateIssuesCommit(userId, repoId, repoUserName, repoName, commit.Commits)
|
||||
|
||||
if err != nil {
|
||||
log.Debug("action.CommitRepoAction(updateIssuesCommit): ", err)
|
||||
}
|
||||
|
||||
if err = NotifyWatchers(&Action{ActUserId: userId, ActUserName: userName, ActEmail: actEmail,
|
||||
OpType: opType, Content: string(bs), RepoId: repoId, RepoUserName: repoUserName,
|
||||
RepoName: repoName, RefName: refName,
|
||||
IsPrivate: repo.IsPrivate}); err != nil {
|
||||
return errors.New("action.CommitRepoAction(NotifyWatchers): " + err.Error())
|
||||
|
||||
}
|
||||
|
||||
// New push event hook.
|
||||
if err := repo.GetOwner(); err != nil {
|
||||
return errors.New("action.CommitRepoAction(GetOwner): " + err.Error())
|
||||
}
|
||||
|
||||
ws, err := GetActiveWebhooksByRepoId(repoId)
|
||||
if err != nil {
|
||||
return errors.New("action.CommitRepoAction(GetActiveWebhooksByRepoId): " + err.Error())
|
||||
}
|
||||
|
||||
// check if repo belongs to org and append additional webhooks
|
||||
if repo.Owner.IsOrganization() {
|
||||
// get hooks for org
|
||||
orgws, err := GetActiveWebhooksByOrgId(repo.OwnerId)
|
||||
if err != nil {
|
||||
return errors.New("action.CommitRepoAction(GetActiveWebhooksByOrgId): " + err.Error())
|
||||
}
|
||||
ws = append(ws, orgws...)
|
||||
}
|
||||
|
||||
if len(ws) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
pusher_email, pusher_name := "", ""
|
||||
pusher, err := GetUserByName(userName)
|
||||
if err == nil {
|
||||
pusher_email = pusher.Email
|
||||
pusher_name = pusher.GetFullNameFallback()
|
||||
}
|
||||
|
||||
commits := make([]*PayloadCommit, len(commit.Commits))
|
||||
for i, cmt := range commit.Commits {
|
||||
author_username := ""
|
||||
author, err := GetUserByEmail(cmt.AuthorEmail)
|
||||
if err == nil {
|
||||
author_username = author.Name
|
||||
}
|
||||
commits[i] = &PayloadCommit{
|
||||
Id: cmt.Sha1,
|
||||
Message: cmt.Message,
|
||||
Url: fmt.Sprintf("%s/commit/%s", repoLink, cmt.Sha1),
|
||||
Author: &PayloadAuthor{
|
||||
Name: cmt.AuthorName,
|
||||
Email: cmt.AuthorEmail,
|
||||
UserName: author_username,
|
||||
},
|
||||
}
|
||||
}
|
||||
p := &Payload{
|
||||
Ref: refFullName,
|
||||
Commits: commits,
|
||||
Repo: &PayloadRepo{
|
||||
Id: repo.Id,
|
||||
Name: repo.LowerName,
|
||||
Url: repoLink,
|
||||
Description: repo.Description,
|
||||
Website: repo.Website,
|
||||
Watchers: repo.NumWatches,
|
||||
Owner: &PayloadAuthor{
|
||||
Name: repo.Owner.GetFullNameFallback(),
|
||||
Email: repo.Owner.Email,
|
||||
UserName: repo.Owner.Name,
|
||||
},
|
||||
Private: repo.IsPrivate,
|
||||
},
|
||||
Pusher: &PayloadAuthor{
|
||||
Name: pusher_name,
|
||||
Email: pusher_email,
|
||||
UserName: userName,
|
||||
},
|
||||
Before: oldCommitId,
|
||||
After: newCommitId,
|
||||
CompareUrl: commit.CompareUrl,
|
||||
}
|
||||
|
||||
for _, w := range ws {
|
||||
w.GetEvent()
|
||||
if !w.HasPushEvent() {
|
||||
continue
|
||||
}
|
||||
|
||||
switch w.HookTaskType {
|
||||
case SLACK:
|
||||
{
|
||||
s, err := GetSlackPayload(p, w.Meta)
|
||||
if err != nil {
|
||||
return errors.New("action.GetSlackPayload: " + err.Error())
|
||||
}
|
||||
CreateHookTask(&HookTask{
|
||||
Type: w.HookTaskType,
|
||||
Url: w.Url,
|
||||
BasePayload: s,
|
||||
ContentType: w.ContentType,
|
||||
IsSsl: w.IsSsl,
|
||||
})
|
||||
}
|
||||
default:
|
||||
{
|
||||
p.Secret = w.Secret
|
||||
CreateHookTask(&HookTask{
|
||||
Type: w.HookTaskType,
|
||||
Url: w.Url,
|
||||
BasePayload: p,
|
||||
ContentType: w.ContentType,
|
||||
IsSsl: w.IsSsl,
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
go DeliverHooks()
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewRepoAction adds new action for creating repository.
|
||||
func NewRepoAction(user *User, repo *Repository) (err error) {
|
||||
if err = NotifyWatchers(&Action{ActUserId: user.Id, ActUserName: user.Name, ActEmail: user.Email,
|
||||
OpType: OP_CREATE_REPO, RepoId: repo.Id, RepoName: repo.Name}); err != nil {
|
||||
log.Error("action.NewRepoAction(notify watchers): %d/%s", user.Id, repo.Name)
|
||||
func NewRepoAction(u *User, repo *Repository) (err error) {
|
||||
if err = NotifyWatchers(&Action{ActUserId: u.Id, ActUserName: u.Name, ActEmail: u.Email,
|
||||
OpType: CREATE_REPO, RepoId: repo.Id, RepoUserName: repo.Owner.Name, RepoName: repo.Name,
|
||||
IsPrivate: repo.IsPrivate}); err != nil {
|
||||
log.Error(4, "NotifyWatchers: %d/%s", u.Id, repo.Name)
|
||||
return err
|
||||
}
|
||||
|
||||
log.Trace("action.NewRepoAction: %s/%s", user.LowerName, repo.LowerName)
|
||||
log.Trace("action.NewRepoAction: %s/%s", u.Name, repo.Name)
|
||||
return err
|
||||
}
|
||||
|
||||
// TransferRepoAction adds new action for transfering repository.
|
||||
func TransferRepoAction(user, newUser *User, repo *Repository) (err error) {
|
||||
if err = NotifyWatchers(&Action{ActUserId: user.Id, ActUserName: user.Name, ActEmail: user.Email,
|
||||
OpType: OP_TRANSFER_REPO, RepoId: repo.Id, RepoName: repo.Name, Content: newUser.Name}); err != nil {
|
||||
log.Error("action.TransferRepoAction(notify watchers): %d/%s", user.Id, repo.Name)
|
||||
// TransferRepoAction adds new action for transferring repository.
|
||||
func TransferRepoAction(u, newUser *User, repo *Repository) (err error) {
|
||||
action := &Action{
|
||||
ActUserId: u.Id,
|
||||
ActUserName: u.Name,
|
||||
ActEmail: u.Email,
|
||||
OpType: TRANSFER_REPO,
|
||||
RepoId: repo.Id,
|
||||
RepoUserName: newUser.Name,
|
||||
RepoName: repo.Name,
|
||||
IsPrivate: repo.IsPrivate,
|
||||
Content: path.Join(repo.Owner.LowerName, repo.LowerName),
|
||||
}
|
||||
if err = NotifyWatchers(action); err != nil {
|
||||
log.Error(4, "NotifyWatchers: %d/%s", u.Id, repo.Name)
|
||||
return err
|
||||
}
|
||||
|
||||
log.Trace("action.TransferRepoAction: %s/%s", user.LowerName, repo.LowerName)
|
||||
// Remove watch for organization.
|
||||
if repo.Owner.IsOrganization() {
|
||||
if err = WatchRepo(repo.Owner.Id, repo.Id, false); err != nil {
|
||||
log.Error(4, "WatchRepo", err)
|
||||
}
|
||||
}
|
||||
|
||||
log.Trace("action.TransferRepoAction: %s/%s", u.Name, repo.Name)
|
||||
return err
|
||||
}
|
||||
|
||||
// GetFeeds returns action list of given user in given context.
|
||||
func GetFeeds(userid, offset int64, isProfile bool) ([]Action, error) {
|
||||
actions := make([]Action, 0, 20)
|
||||
sess := orm.Limit(20, int(offset)).Desc("id").Where("user_id=?", userid)
|
||||
func GetFeeds(uid, offset int64, isProfile bool) ([]*Action, error) {
|
||||
actions := make([]*Action, 0, 20)
|
||||
sess := x.Limit(20, int(offset)).Desc("id").Where("user_id=?", uid)
|
||||
if isProfile {
|
||||
sess.And("act_user_id=?", userid)
|
||||
} else {
|
||||
sess.And("act_user_id!=?", userid)
|
||||
sess.And("is_private=?", false).And("act_user_id=?", uid)
|
||||
}
|
||||
err := sess.Find(&actions)
|
||||
return actions, err
|
||||
|
||||
64
models/admin.go
Normal file
64
models/admin.go
Normal file
@@ -0,0 +1,64 @@
|
||||
// Copyright 2014 The Gogs Authors. All rights reserved.
|
||||
// Use of this source code is governed by a MIT-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package models
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/Unknwon/com"
|
||||
)
|
||||
|
||||
type NoticeType int
|
||||
|
||||
const (
|
||||
NOTICE_REPOSITORY NoticeType = iota + 1
|
||||
)
|
||||
|
||||
// Notice represents a system notice for admin.
|
||||
type Notice struct {
|
||||
Id int64
|
||||
Type NoticeType
|
||||
Description string `xorm:"TEXT"`
|
||||
Created time.Time `xorm:"CREATED"`
|
||||
}
|
||||
|
||||
// TrStr returns a translation format string.
|
||||
func (n *Notice) TrStr() string {
|
||||
return "admin.notices.type_" + com.ToStr(n.Type)
|
||||
}
|
||||
|
||||
// CreateNotice creates new system notice.
|
||||
func CreateNotice(tp NoticeType, desc string) error {
|
||||
n := &Notice{
|
||||
Type: tp,
|
||||
Description: desc,
|
||||
}
|
||||
_, err := x.Insert(n)
|
||||
return err
|
||||
}
|
||||
|
||||
// CreateRepositoryNotice creates new system notice with type NOTICE_REPOSITORY.
|
||||
func CreateRepositoryNotice(desc string) error {
|
||||
return CreateNotice(NOTICE_REPOSITORY, desc)
|
||||
}
|
||||
|
||||
// CountNotices returns number of notices.
|
||||
func CountNotices() int64 {
|
||||
count, _ := x.Count(new(Notice))
|
||||
return count
|
||||
}
|
||||
|
||||
// GetNotices returns given number of notices with offset.
|
||||
func GetNotices(num, offset int) ([]*Notice, error) {
|
||||
notices := make([]*Notice, 0, num)
|
||||
err := x.Limit(num, offset).Desc("id").Find(¬ices)
|
||||
return notices, err
|
||||
}
|
||||
|
||||
// DeleteNotice deletes a system notice by given ID.
|
||||
func DeleteNotice(id int64) error {
|
||||
_, err := x.Id(id).Delete(new(Notice))
|
||||
return err
|
||||
}
|
||||
@@ -6,15 +6,21 @@ package models
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"bytes"
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
"os/exec"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/gogits/git"
|
||||
"github.com/Unknwon/com"
|
||||
|
||||
"github.com/gogits/gogs/modules/base"
|
||||
"github.com/gogits/gogs/modules/git"
|
||||
"github.com/gogits/gogs/modules/log"
|
||||
"github.com/gogits/gogs/modules/mahonia"
|
||||
"github.com/gogits/gogs/modules/process"
|
||||
)
|
||||
|
||||
// Diff line types.
|
||||
@@ -49,6 +55,7 @@ type DiffSection struct {
|
||||
|
||||
type DiffFile struct {
|
||||
Name string
|
||||
Index int
|
||||
Addition, Deletion int
|
||||
Type int
|
||||
IsBin bool
|
||||
@@ -66,7 +73,7 @@ func (diff *Diff) NumFiles() int {
|
||||
|
||||
const DIFF_HEAD = "diff --git "
|
||||
|
||||
func ParsePatch(reader io.Reader) (*Diff, error) {
|
||||
func ParsePatch(pid int64, maxlines int, cmd *exec.Cmd, reader io.Reader) (*Diff, error) {
|
||||
scanner := bufio.NewScanner(reader)
|
||||
var (
|
||||
curFile *DiffFile
|
||||
@@ -75,6 +82,9 @@ func ParsePatch(reader io.Reader) (*Diff, error) {
|
||||
}
|
||||
|
||||
leftLine, rightLine int
|
||||
isTooLong bool
|
||||
// FIXME: use first 30 lines to detect file encoding. Should use cache in the future.
|
||||
buf bytes.Buffer
|
||||
)
|
||||
|
||||
diff := &Diff{Files: make([]*DiffFile, 0)}
|
||||
@@ -86,18 +96,24 @@ func ParsePatch(reader io.Reader) (*Diff, error) {
|
||||
continue
|
||||
}
|
||||
|
||||
i = i + 1
|
||||
|
||||
// Diff data too large.
|
||||
if i == 5000 {
|
||||
log.Warn("Diff data too large")
|
||||
return &Diff{}, nil
|
||||
}
|
||||
|
||||
if line == "" {
|
||||
continue
|
||||
}
|
||||
|
||||
i = i + 1
|
||||
|
||||
// FIXME: use first 30 lines to detect file encoding.
|
||||
if i <= 30 {
|
||||
buf.WriteString(line)
|
||||
}
|
||||
|
||||
// Diff data too large, we only show the first about maxlines lines
|
||||
if i == maxlines {
|
||||
isTooLong = true
|
||||
log.Warn("Diff data too large")
|
||||
//return &Diff{}, nil
|
||||
}
|
||||
|
||||
switch {
|
||||
case line[0] == ' ':
|
||||
diffLine := &DiffLine{Type: DIFF_LINE_PLAIN, Content: line, LeftIdx: leftLine, RightIdx: rightLine}
|
||||
@@ -106,6 +122,10 @@ func ParsePatch(reader io.Reader) (*Diff, error) {
|
||||
curSection.Lines = append(curSection.Lines, diffLine)
|
||||
continue
|
||||
case line[0] == '@':
|
||||
if isTooLong {
|
||||
return diff, nil
|
||||
}
|
||||
|
||||
curSection = &DiffSection{}
|
||||
curFile.Sections = append(curFile.Sections, curSection)
|
||||
ss := strings.Split(line, "@@")
|
||||
@@ -114,8 +134,8 @@ func ParsePatch(reader io.Reader) (*Diff, error) {
|
||||
|
||||
// Parse line number.
|
||||
ranges := strings.Split(ss[len(ss)-2][1:], " ")
|
||||
leftLine, _ = base.StrTo(strings.Split(ranges[0], ",")[0][1:]).Int()
|
||||
rightLine, _ = base.StrTo(strings.Split(ranges[1], ",")[0]).Int()
|
||||
leftLine, _ = com.StrTo(strings.Split(ranges[0], ",")[0][1:]).Int()
|
||||
rightLine, _ = com.StrTo(strings.Split(ranges[1], ",")[0]).Int()
|
||||
continue
|
||||
case line[0] == '+':
|
||||
curFile.Addition++
|
||||
@@ -139,11 +159,16 @@ func ParsePatch(reader io.Reader) (*Diff, error) {
|
||||
|
||||
// Get new file.
|
||||
if strings.HasPrefix(line, DIFF_HEAD) {
|
||||
if isTooLong {
|
||||
return diff, nil
|
||||
}
|
||||
|
||||
fs := strings.Split(line[len(DIFF_HEAD):], " ")
|
||||
a := fs[0]
|
||||
|
||||
curFile = &DiffFile{
|
||||
Name: a[strings.Index(a, "/")+1:],
|
||||
Index: len(diff.Files) + 1,
|
||||
Type: DIFF_FILE_CHANGE,
|
||||
Sections: make([]*DiffSection, 0, 10),
|
||||
}
|
||||
@@ -166,47 +191,81 @@ func ParsePatch(reader io.Reader) (*Diff, error) {
|
||||
}
|
||||
}
|
||||
|
||||
// FIXME: use first 30 lines to detect file encoding.
|
||||
charset, err := base.DetectEncoding(buf.Bytes())
|
||||
if charset != "utf8" && err == nil {
|
||||
decoder := mahonia.NewDecoder(charset)
|
||||
if decoder != nil {
|
||||
for _, f := range diff.Files {
|
||||
for _, sec := range f.Sections {
|
||||
for _, l := range sec.Lines {
|
||||
l.Content = decoder.ConvertString(l.Content)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return diff, nil
|
||||
}
|
||||
|
||||
func GetDiff(repoPath, commitid string) (*Diff, error) {
|
||||
func GetDiffRange(repoPath, beforeCommitId string, afterCommitId string, maxlines int) (*Diff, error) {
|
||||
repo, err := git.OpenRepository(repoPath)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
commit, err := repo.GetCommit(commitid)
|
||||
commit, err := repo.GetCommit(afterCommitId)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// First commit of repository.
|
||||
if commit.ParentCount() == 0 {
|
||||
rd, wr := io.Pipe()
|
||||
go func() {
|
||||
cmd := exec.Command("git", "show", commitid)
|
||||
cmd.Dir = repoPath
|
||||
cmd.Stdout = wr
|
||||
cmd.Stdin = os.Stdin
|
||||
cmd.Stderr = os.Stderr
|
||||
cmd.Run()
|
||||
wr.Close()
|
||||
}()
|
||||
defer rd.Close()
|
||||
return ParsePatch(rd)
|
||||
}
|
||||
|
||||
rd, wr := io.Pipe()
|
||||
var cmd *exec.Cmd
|
||||
// if "after" commit given
|
||||
if beforeCommitId == "" {
|
||||
// First commit of repository.
|
||||
if commit.ParentCount() == 0 {
|
||||
cmd = exec.Command("git", "show", afterCommitId)
|
||||
} else {
|
||||
c, _ := commit.Parent(0)
|
||||
cmd = exec.Command("git", "diff", c.Id.String(), afterCommitId)
|
||||
}
|
||||
} else {
|
||||
cmd = exec.Command("git", "diff", beforeCommitId, afterCommitId)
|
||||
}
|
||||
cmd.Dir = repoPath
|
||||
cmd.Stdout = wr
|
||||
cmd.Stdin = os.Stdin
|
||||
cmd.Stderr = os.Stderr
|
||||
|
||||
done := make(chan error)
|
||||
go func() {
|
||||
c, _ := commit.Parent(0)
|
||||
cmd := exec.Command("git", "diff", c.Id.String(), commitid)
|
||||
cmd.Dir = repoPath
|
||||
cmd.Stdout = wr
|
||||
cmd.Stdin = os.Stdin
|
||||
cmd.Stderr = os.Stderr
|
||||
cmd.Run()
|
||||
cmd.Start()
|
||||
done <- cmd.Wait()
|
||||
wr.Close()
|
||||
}()
|
||||
defer rd.Close()
|
||||
return ParsePatch(rd)
|
||||
|
||||
desc := fmt.Sprintf("GetDiffRange(%s)", repoPath)
|
||||
pid := process.Add(desc, cmd)
|
||||
go func() {
|
||||
// In case process became zombie.
|
||||
select {
|
||||
case <-time.After(5 * time.Minute):
|
||||
if errKill := process.Kill(pid); errKill != nil {
|
||||
log.Error(4, "git_diff.ParsePatch(Kill): %v", err)
|
||||
}
|
||||
<-done
|
||||
// return "", ErrExecTimeout.Error(), ErrExecTimeout
|
||||
case err = <-done:
|
||||
process.Remove(pid)
|
||||
}
|
||||
}()
|
||||
|
||||
return ParsePatch(pid, maxlines, cmd, rd)
|
||||
}
|
||||
|
||||
func GetDiffCommit(repoPath, commitId string, maxlines int) (*Diff, error) {
|
||||
return GetDiffRange(repoPath, "", commitId, maxlines)
|
||||
}
|
||||
|
||||
1036
models/issue.go
1036
models/issue.go
File diff suppressed because it is too large
Load Diff
@@ -1,38 +0,0 @@
|
||||
// Copyright github.com/juju2013. All rights reserved.
|
||||
// Use of this source code is governed by a MIT-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package models
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/gogits/gogs/modules/auth/ldap"
|
||||
"github.com/gogits/gogs/modules/log"
|
||||
)
|
||||
|
||||
// Query if name/passwd can login against the LDAP direcotry pool
|
||||
// Create a local user if success
|
||||
// Return the same LoginUserPlain semantic
|
||||
func LoginUserLdap(name, passwd string) (*User, error) {
|
||||
mail, logged := ldap.LoginUser(name, passwd)
|
||||
if !logged {
|
||||
// user not in LDAP, do nothing
|
||||
return nil, ErrUserNotExist
|
||||
}
|
||||
// fake a local user creation
|
||||
user := User{
|
||||
LowerName: strings.ToLower(name),
|
||||
Name: strings.ToLower(name),
|
||||
LoginType: 389,
|
||||
IsActive: true,
|
||||
Passwd: passwd,
|
||||
Email: mail}
|
||||
_, err := RegisterUser(&user)
|
||||
if err != nil {
|
||||
log.Debug("LDAP local user %s fond (%s) ", name, err)
|
||||
}
|
||||
// simulate local user login
|
||||
localUser, err2 := GetUserByName(user.Name)
|
||||
return localUser, err2
|
||||
}
|
||||
363
models/login.go
Normal file
363
models/login.go
Normal file
@@ -0,0 +1,363 @@
|
||||
// Copyright 2014 The Gogs Authors. All rights reserved.
|
||||
// Use of this source code is governed by a MIT-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package models
|
||||
|
||||
import (
|
||||
"crypto/tls"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"net/smtp"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/go-xorm/core"
|
||||
"github.com/go-xorm/xorm"
|
||||
|
||||
"github.com/gogits/gogs/modules/auth/ldap"
|
||||
"github.com/gogits/gogs/modules/log"
|
||||
"github.com/gogits/gogs/modules/uuid"
|
||||
)
|
||||
|
||||
type LoginType int
|
||||
|
||||
const (
|
||||
NOTYPE LoginType = iota
|
||||
PLAIN
|
||||
LDAP
|
||||
SMTP
|
||||
)
|
||||
|
||||
var (
|
||||
ErrAuthenticationAlreadyExist = errors.New("Authentication already exist")
|
||||
ErrAuthenticationNotExist = errors.New("Authentication does not exist")
|
||||
ErrAuthenticationUserUsed = errors.New("Authentication has been used by some users")
|
||||
)
|
||||
|
||||
var LoginTypes = map[LoginType]string{
|
||||
LDAP: "LDAP",
|
||||
SMTP: "SMTP",
|
||||
}
|
||||
|
||||
// Ensure structs implemented interface.
|
||||
var (
|
||||
_ core.Conversion = &LDAPConfig{}
|
||||
_ core.Conversion = &SMTPConfig{}
|
||||
)
|
||||
|
||||
type LDAPConfig struct {
|
||||
ldap.Ldapsource
|
||||
}
|
||||
|
||||
func (cfg *LDAPConfig) FromDB(bs []byte) error {
|
||||
return json.Unmarshal(bs, &cfg.Ldapsource)
|
||||
}
|
||||
|
||||
func (cfg *LDAPConfig) ToDB() ([]byte, error) {
|
||||
return json.Marshal(cfg.Ldapsource)
|
||||
}
|
||||
|
||||
type SMTPConfig struct {
|
||||
Auth string
|
||||
Host string
|
||||
Port int
|
||||
TLS bool
|
||||
}
|
||||
|
||||
func (cfg *SMTPConfig) FromDB(bs []byte) error {
|
||||
return json.Unmarshal(bs, cfg)
|
||||
}
|
||||
|
||||
func (cfg *SMTPConfig) ToDB() ([]byte, error) {
|
||||
return json.Marshal(cfg)
|
||||
}
|
||||
|
||||
type LoginSource struct {
|
||||
Id int64
|
||||
Type LoginType
|
||||
Name string `xorm:"UNIQUE"`
|
||||
IsActived bool `xorm:"NOT NULL DEFAULT false"`
|
||||
Cfg core.Conversion `xorm:"TEXT"`
|
||||
AllowAutoRegister bool `xorm:"NOT NULL DEFAULT false"`
|
||||
Created time.Time `xorm:"CREATED"`
|
||||
Updated time.Time `xorm:"UPDATED"`
|
||||
}
|
||||
|
||||
func (source *LoginSource) TypeString() string {
|
||||
return LoginTypes[source.Type]
|
||||
}
|
||||
|
||||
func (source *LoginSource) LDAP() *LDAPConfig {
|
||||
return source.Cfg.(*LDAPConfig)
|
||||
}
|
||||
|
||||
func (source *LoginSource) SMTP() *SMTPConfig {
|
||||
return source.Cfg.(*SMTPConfig)
|
||||
}
|
||||
|
||||
func (source *LoginSource) BeforeSet(colName string, val xorm.Cell) {
|
||||
if colName == "type" {
|
||||
ty := (*val).(int64)
|
||||
switch LoginType(ty) {
|
||||
case LDAP:
|
||||
source.Cfg = new(LDAPConfig)
|
||||
case SMTP:
|
||||
source.Cfg = new(SMTPConfig)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func CreateSource(source *LoginSource) error {
|
||||
_, err := x.Insert(source)
|
||||
return err
|
||||
}
|
||||
|
||||
func GetAuths() ([]*LoginSource, error) {
|
||||
var auths = make([]*LoginSource, 0, 5)
|
||||
err := x.Find(&auths)
|
||||
return auths, err
|
||||
}
|
||||
|
||||
func GetLoginSourceById(id int64) (*LoginSource, error) {
|
||||
source := new(LoginSource)
|
||||
has, err := x.Id(id).Get(source)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
} else if !has {
|
||||
return nil, ErrAuthenticationNotExist
|
||||
}
|
||||
return source, nil
|
||||
}
|
||||
|
||||
func UpdateSource(source *LoginSource) error {
|
||||
_, err := x.Id(source.Id).AllCols().Update(source)
|
||||
return err
|
||||
}
|
||||
|
||||
func DelLoginSource(source *LoginSource) error {
|
||||
cnt, err := x.Count(&User{LoginSource: source.Id})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if cnt > 0 {
|
||||
return ErrAuthenticationUserUsed
|
||||
}
|
||||
_, err = x.Id(source.Id).Delete(&LoginSource{})
|
||||
return err
|
||||
}
|
||||
|
||||
// UserSignIn validates user name and password.
|
||||
func UserSignIn(uname, passwd string) (*User, error) {
|
||||
u := new(User)
|
||||
if strings.Contains(uname, "@") {
|
||||
u = &User{Email: uname}
|
||||
} else {
|
||||
u = &User{LowerName: strings.ToLower(uname)}
|
||||
}
|
||||
|
||||
has, err := x.Get(u)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if u.LoginType == NOTYPE && has {
|
||||
u.LoginType = PLAIN
|
||||
}
|
||||
|
||||
// For plain login, user must exist to reach this line.
|
||||
// Now verify password.
|
||||
if u.LoginType == PLAIN {
|
||||
newUser := &User{Passwd: passwd, Salt: u.Salt}
|
||||
newUser.EncodePasswd()
|
||||
if u.Passwd != newUser.Passwd {
|
||||
return nil, ErrUserNotExist
|
||||
}
|
||||
return u, nil
|
||||
} else {
|
||||
if !has {
|
||||
var sources []LoginSource
|
||||
if err = x.UseBool().Find(&sources,
|
||||
&LoginSource{IsActived: true, AllowAutoRegister: true}); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
for _, source := range sources {
|
||||
if source.Type == LDAP {
|
||||
u, err := LoginUserLdapSource(nil, uname, passwd,
|
||||
source.Id, source.Cfg.(*LDAPConfig), true)
|
||||
if err == nil {
|
||||
return u, nil
|
||||
}
|
||||
log.Warn("Fail to login(%s) by LDAP(%s): %v", uname, source.Name, err)
|
||||
} else if source.Type == SMTP {
|
||||
u, err := LoginUserSMTPSource(nil, uname, passwd,
|
||||
source.Id, source.Cfg.(*SMTPConfig), true)
|
||||
if err == nil {
|
||||
return u, nil
|
||||
}
|
||||
log.Warn("Fail to login(%s) by SMTP(%s): %v", uname, source.Name, err)
|
||||
}
|
||||
}
|
||||
|
||||
return nil, ErrUserNotExist
|
||||
}
|
||||
|
||||
var source LoginSource
|
||||
hasSource, err := x.Id(u.LoginSource).Get(&source)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
} else if !hasSource {
|
||||
return nil, ErrLoginSourceNotExist
|
||||
} else if !source.IsActived {
|
||||
return nil, ErrLoginSourceNotActived
|
||||
}
|
||||
|
||||
switch u.LoginType {
|
||||
case LDAP:
|
||||
return LoginUserLdapSource(u, u.LoginName, passwd,
|
||||
source.Id, source.Cfg.(*LDAPConfig), false)
|
||||
case SMTP:
|
||||
return LoginUserSMTPSource(u, u.LoginName, passwd,
|
||||
source.Id, source.Cfg.(*SMTPConfig), false)
|
||||
}
|
||||
return nil, ErrUnsupportedLoginType
|
||||
}
|
||||
}
|
||||
|
||||
// Query if name/passwd can login against the LDAP directory pool
|
||||
// Create a local user if success
|
||||
// Return the same LoginUserPlain semantic
|
||||
// FIXME: https://github.com/gogits/gogs/issues/672
|
||||
func LoginUserLdapSource(u *User, name, passwd string, sourceId int64, cfg *LDAPConfig, autoRegister bool) (*User, error) {
|
||||
mail, logged := cfg.Ldapsource.SearchEntry(name, passwd)
|
||||
if !logged {
|
||||
// User not in LDAP, do nothing
|
||||
return nil, ErrUserNotExist
|
||||
}
|
||||
if !autoRegister {
|
||||
return u, nil
|
||||
}
|
||||
|
||||
// Fallback.
|
||||
if len(mail) == 0 {
|
||||
mail = uuid.NewV4().String() + "@localhost"
|
||||
}
|
||||
|
||||
u = &User{
|
||||
Name: name,
|
||||
LoginType: LDAP,
|
||||
LoginSource: sourceId,
|
||||
LoginName: name,
|
||||
Passwd: passwd,
|
||||
Email: mail,
|
||||
IsActive: true,
|
||||
}
|
||||
return u, CreateUser(u)
|
||||
}
|
||||
|
||||
type loginAuth struct {
|
||||
username, password string
|
||||
}
|
||||
|
||||
func LoginAuth(username, password string) smtp.Auth {
|
||||
return &loginAuth{username, password}
|
||||
}
|
||||
|
||||
func (a *loginAuth) Start(server *smtp.ServerInfo) (string, []byte, error) {
|
||||
return "LOGIN", []byte(a.username), nil
|
||||
}
|
||||
|
||||
func (a *loginAuth) Next(fromServer []byte, more bool) ([]byte, error) {
|
||||
if more {
|
||||
switch string(fromServer) {
|
||||
case "Username:":
|
||||
return []byte(a.username), nil
|
||||
case "Password:":
|
||||
return []byte(a.password), nil
|
||||
}
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
var (
|
||||
SMTP_PLAIN = "PLAIN"
|
||||
SMTP_LOGIN = "LOGIN"
|
||||
SMTPAuths = []string{SMTP_PLAIN, SMTP_LOGIN}
|
||||
)
|
||||
|
||||
func SmtpAuth(host string, port int, a smtp.Auth, useTls bool) error {
|
||||
c, err := smtp.Dial(fmt.Sprintf("%s:%d", host, port))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer c.Close()
|
||||
|
||||
if err = c.Hello("gogs"); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if useTls {
|
||||
if ok, _ := c.Extension("STARTTLS"); ok {
|
||||
config := &tls.Config{ServerName: host}
|
||||
if err = c.StartTLS(config); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
return errors.New("SMTP server unsupports TLS")
|
||||
}
|
||||
}
|
||||
|
||||
if ok, _ := c.Extension("AUTH"); ok {
|
||||
if err = c.Auth(a); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
return ErrUnsupportedLoginType
|
||||
}
|
||||
|
||||
// Query if name/passwd can login against the LDAP directory pool
|
||||
// Create a local user if success
|
||||
// Return the same LoginUserPlain semantic
|
||||
func LoginUserSMTPSource(u *User, name, passwd string, sourceId int64, cfg *SMTPConfig, autoRegister bool) (*User, error) {
|
||||
var auth smtp.Auth
|
||||
if cfg.Auth == SMTP_PLAIN {
|
||||
auth = smtp.PlainAuth("", name, passwd, cfg.Host)
|
||||
} else if cfg.Auth == SMTP_LOGIN {
|
||||
auth = LoginAuth(name, passwd)
|
||||
} else {
|
||||
return nil, errors.New("Unsupported SMTP auth type")
|
||||
}
|
||||
|
||||
if err := SmtpAuth(cfg.Host, cfg.Port, auth, cfg.TLS); err != nil {
|
||||
if strings.Contains(err.Error(), "Username and Password not accepted") {
|
||||
return nil, ErrUserNotExist
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if !autoRegister {
|
||||
return u, nil
|
||||
}
|
||||
|
||||
var loginName = name
|
||||
idx := strings.Index(name, "@")
|
||||
if idx > -1 {
|
||||
loginName = name[:idx]
|
||||
}
|
||||
// fake a local user creation
|
||||
u = &User{
|
||||
LowerName: strings.ToLower(loginName),
|
||||
Name: strings.ToLower(loginName),
|
||||
LoginType: SMTP,
|
||||
LoginSource: sourceId,
|
||||
LoginName: name,
|
||||
IsActive: true,
|
||||
Passwd: passwd,
|
||||
Email: name,
|
||||
}
|
||||
err := CreateUser(u)
|
||||
return u, err
|
||||
}
|
||||
163
models/models.go
163
models/models.go
@@ -5,6 +5,7 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
"fmt"
|
||||
"os"
|
||||
"path"
|
||||
@@ -14,13 +15,19 @@ import (
|
||||
"github.com/go-xorm/xorm"
|
||||
_ "github.com/lib/pq"
|
||||
|
||||
"github.com/gogits/gogs/modules/base"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
)
|
||||
|
||||
var (
|
||||
orm *xorm.Engine
|
||||
tables []interface{}
|
||||
// Engine represents a xorm engine or session.
|
||||
type Engine interface {
|
||||
Delete(interface{}) (int64, error)
|
||||
Exec(string, ...interface{}) (sql.Result, error)
|
||||
Insert(...interface{}) (int64, error)
|
||||
}
|
||||
|
||||
var (
|
||||
x *xorm.Engine
|
||||
tables []interface{}
|
||||
HasEngine bool
|
||||
|
||||
DbCfg struct {
|
||||
@@ -32,98 +39,90 @@ var (
|
||||
)
|
||||
|
||||
func init() {
|
||||
tables = append(tables, new(User), new(PublicKey), new(Repository), new(Watch),
|
||||
new(Action), new(Access), new(Issue), new(Comment), new(Oauth2), new(Follow),
|
||||
new(Mirror), new(Release))
|
||||
tables = append(tables,
|
||||
new(User), new(PublicKey), new(Follow), new(Oauth2), new(AccessToken),
|
||||
new(Repository), new(Watch), new(Star), new(Action), new(Access),
|
||||
new(Issue), new(Comment), new(Attachment), new(IssueUser), new(Label), new(Milestone),
|
||||
new(Mirror), new(Release), new(LoginSource), new(Webhook),
|
||||
new(UpdateTask), new(HookTask), new(Team), new(OrgUser), new(TeamUser),
|
||||
new(Notice))
|
||||
}
|
||||
|
||||
func LoadModelsConfig() {
|
||||
DbCfg.Type = base.Cfg.MustValue("database", "DB_TYPE")
|
||||
DbCfg.Type = setting.Cfg.MustValue("database", "DB_TYPE")
|
||||
if DbCfg.Type == "sqlite3" {
|
||||
UseSQLite3 = true
|
||||
}
|
||||
DbCfg.Host = base.Cfg.MustValue("database", "HOST")
|
||||
DbCfg.Name = base.Cfg.MustValue("database", "NAME")
|
||||
DbCfg.User = base.Cfg.MustValue("database", "USER")
|
||||
DbCfg.Pwd = base.Cfg.MustValue("database", "PASSWD")
|
||||
DbCfg.SslMode = base.Cfg.MustValue("database", "SSL_MODE")
|
||||
DbCfg.Path = base.Cfg.MustValue("database", "PATH", "data/gogs.db")
|
||||
DbCfg.Host = setting.Cfg.MustValue("database", "HOST")
|
||||
DbCfg.Name = setting.Cfg.MustValue("database", "NAME")
|
||||
DbCfg.User = setting.Cfg.MustValue("database", "USER")
|
||||
if len(DbCfg.Pwd) == 0 {
|
||||
DbCfg.Pwd = setting.Cfg.MustValue("database", "PASSWD")
|
||||
}
|
||||
DbCfg.SslMode = setting.Cfg.MustValue("database", "SSL_MODE")
|
||||
DbCfg.Path = setting.Cfg.MustValue("database", "PATH", "data/gogs.db")
|
||||
}
|
||||
|
||||
func NewTestEngine(x *xorm.Engine) (err error) {
|
||||
func getEngine() (*xorm.Engine, error) {
|
||||
cnnstr := ""
|
||||
switch DbCfg.Type {
|
||||
case "mysql":
|
||||
x, err = xorm.NewEngine("mysql", fmt.Sprintf("%s:%s@tcp(%s)/%s?charset=utf8",
|
||||
DbCfg.User, DbCfg.Pwd, DbCfg.Host, DbCfg.Name))
|
||||
cnnstr = fmt.Sprintf("%s:%s@tcp(%s)/%s?charset=utf8",
|
||||
DbCfg.User, DbCfg.Pwd, DbCfg.Host, DbCfg.Name)
|
||||
case "postgres":
|
||||
var host, port = "127.0.0.1", "5432"
|
||||
fields := strings.Split(DbCfg.Host, ":")
|
||||
if len(fields) > 0 {
|
||||
if len(fields) > 0 && len(strings.TrimSpace(fields[0])) > 0 {
|
||||
host = fields[0]
|
||||
}
|
||||
if len(fields) > 1 {
|
||||
if len(fields) > 1 && len(strings.TrimSpace(fields[1])) > 0 {
|
||||
port = fields[1]
|
||||
}
|
||||
cnnstr := fmt.Sprintf("user=%s password=%s host=%s port=%s dbname=%s sslmode=%s",
|
||||
cnnstr = fmt.Sprintf("user=%s password=%s host=%s port=%s dbname=%s sslmode=%s",
|
||||
DbCfg.User, DbCfg.Pwd, host, port, DbCfg.Name, DbCfg.SslMode)
|
||||
//fmt.Println(cnnstr)
|
||||
x, err = xorm.NewEngine("postgres", cnnstr)
|
||||
case "sqlite3":
|
||||
if !EnableSQLite3 {
|
||||
return fmt.Errorf("Unknown database type: %s", DbCfg.Type)
|
||||
return nil, fmt.Errorf("Unknown database type: %s", DbCfg.Type)
|
||||
}
|
||||
os.MkdirAll(path.Dir(DbCfg.Path), os.ModePerm)
|
||||
x, err = xorm.NewEngine("sqlite3", DbCfg.Path)
|
||||
cnnstr = "file:" + DbCfg.Path + "?cache=shared&mode=rwc"
|
||||
default:
|
||||
return fmt.Errorf("Unknown database type: %s", DbCfg.Type)
|
||||
return nil, fmt.Errorf("Unknown database type: %s", DbCfg.Type)
|
||||
}
|
||||
return xorm.NewEngine(DbCfg.Type, cnnstr)
|
||||
}
|
||||
|
||||
func NewTestEngine(x *xorm.Engine) (err error) {
|
||||
x, err = getEngine()
|
||||
if err != nil {
|
||||
return fmt.Errorf("models.init(fail to conntect database): %v", err)
|
||||
return fmt.Errorf("models.init(fail to connect to database): %v", err)
|
||||
}
|
||||
|
||||
return x.Sync(tables...)
|
||||
}
|
||||
|
||||
func SetEngine() (err error) {
|
||||
switch DbCfg.Type {
|
||||
case "mysql":
|
||||
orm, err = xorm.NewEngine("mysql", fmt.Sprintf("%s:%s@tcp(%s)/%s?charset=utf8",
|
||||
DbCfg.User, DbCfg.Pwd, DbCfg.Host, DbCfg.Name))
|
||||
case "postgres":
|
||||
var host, port = "127.0.0.1", "5432"
|
||||
fields := strings.Split(DbCfg.Host, ":")
|
||||
if len(fields) > 0 {
|
||||
host = fields[0]
|
||||
}
|
||||
if len(fields) > 1 {
|
||||
port = fields[1]
|
||||
}
|
||||
orm, err = xorm.NewEngine("postgres", fmt.Sprintf("user=%s password=%s host=%s port=%s dbname=%s sslmode=%s",
|
||||
DbCfg.User, DbCfg.Pwd, host, port, DbCfg.Name, DbCfg.SslMode))
|
||||
case "sqlite3":
|
||||
os.MkdirAll(path.Dir(DbCfg.Path), os.ModePerm)
|
||||
orm, err = xorm.NewEngine("sqlite3", DbCfg.Path)
|
||||
default:
|
||||
return fmt.Errorf("Unknown database type: %s", DbCfg.Type)
|
||||
}
|
||||
x, err = getEngine()
|
||||
if err != nil {
|
||||
return fmt.Errorf("models.init(fail to conntect database): %v", err)
|
||||
return fmt.Errorf("models.init(fail to connect to database): %v", err)
|
||||
}
|
||||
|
||||
// WARNNING: for serv command, MUST remove the output to os.stdout,
|
||||
// WARNING: for serv command, MUST remove the output to os.stdout,
|
||||
// so use log file to instead print to stdout.
|
||||
execDir, _ := base.ExecDir()
|
||||
logPath := execDir + "/log/xorm.log"
|
||||
logPath := path.Join(setting.LogRootPath, "xorm.log")
|
||||
os.MkdirAll(path.Dir(logPath), os.ModePerm)
|
||||
|
||||
f, err := os.Create(logPath)
|
||||
if err != nil {
|
||||
return fmt.Errorf("models.init(fail to create xorm.log): %v", err)
|
||||
}
|
||||
orm.Logger = xorm.NewSimpleLogger(f)
|
||||
x.Logger = xorm.NewSimpleLogger(f)
|
||||
|
||||
orm.ShowSQL = true
|
||||
orm.ShowDebug = true
|
||||
orm.ShowErr = true
|
||||
x.ShowSQL = true
|
||||
x.ShowInfo = true
|
||||
x.ShowDebug = true
|
||||
x.ShowErr = true
|
||||
x.ShowWarn = true
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -131,7 +130,7 @@ func NewEngine() (err error) {
|
||||
if err = SetEngine(); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = orm.Sync(tables...); err != nil {
|
||||
if err = x.StoreEngine("InnoDB").Sync2(tables...); err != nil {
|
||||
return fmt.Errorf("sync database struct error: %v\n", err)
|
||||
}
|
||||
return nil
|
||||
@@ -139,24 +138,46 @@ func NewEngine() (err error) {
|
||||
|
||||
type Statistic struct {
|
||||
Counter struct {
|
||||
User, PublicKey, Repo,
|
||||
Watch, Action, Access,
|
||||
Issue, Comment,
|
||||
Mirror, Oauth, Release int64
|
||||
User, Org, PublicKey,
|
||||
Repo, Watch, Star, Action, Access,
|
||||
Issue, Comment, Oauth, Follow,
|
||||
Mirror, Release, LoginSource, Webhook,
|
||||
Milestone, Label, HookTask,
|
||||
Team, UpdateTask, Attachment int64
|
||||
}
|
||||
}
|
||||
|
||||
func GetStatistic() (stats Statistic) {
|
||||
stats.Counter.User, _ = orm.Count(new(User))
|
||||
stats.Counter.PublicKey, _ = orm.Count(new(PublicKey))
|
||||
stats.Counter.Repo, _ = orm.Count(new(Repository))
|
||||
stats.Counter.Watch, _ = orm.Count(new(Watch))
|
||||
stats.Counter.Action, _ = orm.Count(new(Action))
|
||||
stats.Counter.Access, _ = orm.Count(new(Access))
|
||||
stats.Counter.Issue, _ = orm.Count(new(Issue))
|
||||
stats.Counter.Comment, _ = orm.Count(new(Comment))
|
||||
stats.Counter.Mirror, _ = orm.Count(new(Mirror))
|
||||
stats.Counter.Oauth, _ = orm.Count(new(Oauth2))
|
||||
stats.Counter.Release, _ = orm.Count(new(Release))
|
||||
stats.Counter.User = CountUsers()
|
||||
stats.Counter.Org = CountOrganizations()
|
||||
stats.Counter.PublicKey, _ = x.Count(new(PublicKey))
|
||||
stats.Counter.Repo = CountRepositories()
|
||||
stats.Counter.Watch, _ = x.Count(new(Watch))
|
||||
stats.Counter.Star, _ = x.Count(new(Star))
|
||||
stats.Counter.Action, _ = x.Count(new(Action))
|
||||
stats.Counter.Access, _ = x.Count(new(Access))
|
||||
stats.Counter.Issue, _ = x.Count(new(Issue))
|
||||
stats.Counter.Comment, _ = x.Count(new(Comment))
|
||||
stats.Counter.Oauth, _ = x.Count(new(Oauth2))
|
||||
stats.Counter.Follow, _ = x.Count(new(Follow))
|
||||
stats.Counter.Mirror, _ = x.Count(new(Mirror))
|
||||
stats.Counter.Release, _ = x.Count(new(Release))
|
||||
stats.Counter.LoginSource, _ = x.Count(new(LoginSource))
|
||||
stats.Counter.Webhook, _ = x.Count(new(Webhook))
|
||||
stats.Counter.Milestone, _ = x.Count(new(Milestone))
|
||||
stats.Counter.Label, _ = x.Count(new(Label))
|
||||
stats.Counter.HookTask, _ = x.Count(new(HookTask))
|
||||
stats.Counter.Team, _ = x.Count(new(Team))
|
||||
stats.Counter.UpdateTask, _ = x.Count(new(UpdateTask))
|
||||
stats.Counter.Attachment, _ = x.Count(new(Attachment))
|
||||
return
|
||||
}
|
||||
|
||||
func Ping() error {
|
||||
return x.Ping()
|
||||
}
|
||||
|
||||
// DumpDatabase dumps all data from database to file system.
|
||||
func DumpDatabase(filePath string) error {
|
||||
return x.DumpAllToFile(filePath)
|
||||
}
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
// Copyright 2014 The Gogs Authors. All rights reserved.
|
||||
// Use of this source code is governed by a MIT-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package models
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/lunny/xorm"
|
||||
_ "github.com/mattn/go-sqlite3"
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
"github.com/gogits/gogs/modules/base"
|
||||
)
|
||||
|
||||
func init() {
|
||||
var err error
|
||||
orm, err = xorm.NewEngine("sqlite3", "./test.db")
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
}
|
||||
|
||||
orm.ShowSQL = true
|
||||
orm.ShowDebug = true
|
||||
|
||||
err = orm.Sync(&User{}, &Repository{})
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
}
|
||||
|
||||
base.RepoRootPath = "test"
|
||||
}
|
||||
|
||||
func TestCreateRepository(t *testing.T) {
|
||||
user := User{Id: 1, Name: "foobar", Type: UT_INDIVIDUAL}
|
||||
_, err := CreateRepository(&user, "test", "", "", "test repo desc", false, false)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestDeleteRepository(t *testing.T) {
|
||||
err := DeleteRepository(1, 1, "foobar")
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestCommitRepoAction(t *testing.T) {
|
||||
Convey("Create a commit repository action", t, func() {
|
||||
|
||||
})
|
||||
}
|
||||
@@ -6,18 +6,19 @@ package models
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"time"
|
||||
)
|
||||
|
||||
// OT: Oauth2 Type
|
||||
type OauthType int
|
||||
|
||||
const (
|
||||
OT_GITHUB = iota + 1
|
||||
OT_GOOGLE
|
||||
OT_TWITTER
|
||||
OT_QQ
|
||||
OT_WEIBO
|
||||
OT_BITBUCKET
|
||||
OT_OSCHINA
|
||||
OT_FACEBOOK
|
||||
GITHUB OauthType = iota + 1
|
||||
GOOGLE
|
||||
TWITTER
|
||||
QQ
|
||||
WEIBO
|
||||
BITBUCKET
|
||||
FACEBOOK
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -26,27 +27,30 @@ var (
|
||||
)
|
||||
|
||||
type Oauth2 struct {
|
||||
Id int64
|
||||
Uid int64 `xorm:"unique(s)"` // userId
|
||||
User *User `xorm:"-"`
|
||||
Type int `xorm:"unique(s) unique(oauth)"` // twitter,github,google...
|
||||
Identity string `xorm:"unique(s) unique(oauth)"` // id..
|
||||
Token string `xorm:"TEXT not null"`
|
||||
Id int64
|
||||
Uid int64 `xorm:"unique(s)"` // userId
|
||||
User *User `xorm:"-"`
|
||||
Type int `xorm:"unique(s) unique(oauth)"` // twitter,github,google...
|
||||
Identity string `xorm:"unique(s) unique(oauth)"` // id..
|
||||
Token string `xorm:"TEXT not null"`
|
||||
Created time.Time `xorm:"CREATED"`
|
||||
Updated time.Time
|
||||
HasRecentActivity bool `xorm:"-"`
|
||||
}
|
||||
|
||||
func BindUserOauth2(userId, oauthId int64) error {
|
||||
_, err := orm.Id(oauthId).Update(&Oauth2{Uid: userId})
|
||||
_, err := x.Id(oauthId).Update(&Oauth2{Uid: userId})
|
||||
return err
|
||||
}
|
||||
|
||||
func AddOauth2(oa *Oauth2) error {
|
||||
_, err := orm.Insert(oa)
|
||||
_, err := x.Insert(oa)
|
||||
return err
|
||||
}
|
||||
|
||||
func GetOauth2(identity string) (oa *Oauth2, err error) {
|
||||
oa = &Oauth2{Identity: identity}
|
||||
isExist, err := orm.Get(oa)
|
||||
isExist, err := x.Get(oa)
|
||||
if err != nil {
|
||||
return
|
||||
} else if !isExist {
|
||||
@@ -60,7 +64,7 @@ func GetOauth2(identity string) (oa *Oauth2, err error) {
|
||||
|
||||
func GetOauth2ById(id int64) (oa *Oauth2, err error) {
|
||||
oa = new(Oauth2)
|
||||
has, err := orm.Id(id).Get(oa)
|
||||
has, err := x.Id(id).Get(oa)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
} else if !has {
|
||||
@@ -69,8 +73,34 @@ func GetOauth2ById(id int64) (oa *Oauth2, err error) {
|
||||
return oa, nil
|
||||
}
|
||||
|
||||
// GetOauthByUserId returns list of oauthes that are releated to given user.
|
||||
func GetOauthByUserId(uid int64) (oas []*Oauth2, err error) {
|
||||
err = orm.Find(&oas, Oauth2{Uid: uid})
|
||||
return oas, err
|
||||
// UpdateOauth2 updates given OAuth2.
|
||||
func UpdateOauth2(oa *Oauth2) error {
|
||||
_, err := x.Id(oa.Id).AllCols().Update(oa)
|
||||
return err
|
||||
}
|
||||
|
||||
// GetOauthByUserId returns list of oauthes that are related to given user.
|
||||
func GetOauthByUserId(uid int64) ([]*Oauth2, error) {
|
||||
socials := make([]*Oauth2, 0, 5)
|
||||
err := x.Find(&socials, Oauth2{Uid: uid})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
for _, social := range socials {
|
||||
social.HasRecentActivity = social.Updated.Add(7 * 24 * time.Hour).After(time.Now())
|
||||
}
|
||||
return socials, err
|
||||
}
|
||||
|
||||
// DeleteOauth2ById deletes a oauth2 by ID.
|
||||
func DeleteOauth2ById(id int64) error {
|
||||
_, err := x.Delete(&Oauth2{Id: id})
|
||||
return err
|
||||
}
|
||||
|
||||
// CleanUnbindOauth deletes all unbind OAuthes.
|
||||
func CleanUnbindOauth() error {
|
||||
_, err := x.Delete(&Oauth2{Uid: -1})
|
||||
return err
|
||||
}
|
||||
|
||||
1103
models/org.go
Normal file
1103
models/org.go
Normal file
File diff suppressed because it is too large
Load Diff
@@ -21,22 +21,26 @@ import (
|
||||
"github.com/Unknwon/com"
|
||||
|
||||
"github.com/gogits/gogs/modules/log"
|
||||
"github.com/gogits/gogs/modules/process"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
)
|
||||
|
||||
const (
|
||||
// "### autogenerated by gitgos, DO NOT EDIT\n"
|
||||
TPL_PUBLICK_KEY = `command="%s serv key-%d",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty %s`
|
||||
_TPL_PUBLICK_KEY = `command="%s serv key-%d",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty %s` + "\n"
|
||||
)
|
||||
|
||||
var (
|
||||
ErrKeyAlreadyExist = errors.New("Public key already exist")
|
||||
ErrKeyNotExist = errors.New("Public key does not exist")
|
||||
ErrKeyUnableVerify = errors.New("Unable to verify public key")
|
||||
)
|
||||
|
||||
var sshOpLocker = sync.Mutex{}
|
||||
|
||||
var (
|
||||
sshPath string
|
||||
appPath string
|
||||
SshPath string // SSH directory.
|
||||
appPath string // Execution(binary) path.
|
||||
)
|
||||
|
||||
// exePath returns the executable path.
|
||||
@@ -52,7 +56,7 @@ func exePath() (string, error) {
|
||||
func homeDir() string {
|
||||
home, err := com.HomeDir()
|
||||
if err != nil {
|
||||
return "/"
|
||||
log.Fatal(4, "Fail to get home directory: %v", err)
|
||||
}
|
||||
return home
|
||||
}
|
||||
@@ -60,40 +64,137 @@ func homeDir() string {
|
||||
func init() {
|
||||
var err error
|
||||
|
||||
appPath, err = exePath()
|
||||
if err != nil {
|
||||
fmt.Printf("publickey.init(fail to get app path): %v\n", err)
|
||||
os.Exit(2)
|
||||
if appPath, err = exePath(); err != nil {
|
||||
log.Fatal(4, "fail to get app path: %v\n", err)
|
||||
}
|
||||
appPath = strings.Replace(appPath, "\\", "/", -1)
|
||||
|
||||
// Determine and create .ssh path.
|
||||
sshPath = filepath.Join(homeDir(), ".ssh")
|
||||
if err = os.MkdirAll(sshPath, os.ModePerm); err != nil {
|
||||
fmt.Printf("publickey.init(fail to create sshPath(%s)): %v\n", sshPath, err)
|
||||
os.Exit(2)
|
||||
SshPath = filepath.Join(homeDir(), ".ssh")
|
||||
if err = os.MkdirAll(SshPath, 0700); err != nil {
|
||||
log.Fatal(4, "fail to create SshPath(%s): %v\n", SshPath, err)
|
||||
}
|
||||
}
|
||||
|
||||
// PublicKey represents a SSH key of user.
|
||||
// PublicKey represents a SSH key.
|
||||
type PublicKey struct {
|
||||
Id int64
|
||||
OwnerId int64 `xorm:"UNIQUE(s) INDEX NOT NULL"`
|
||||
Name string `xorm:"UNIQUE(s) NOT NULL"`
|
||||
Fingerprint string
|
||||
Content string `xorm:"TEXT NOT NULL"`
|
||||
Created time.Time `xorm:"CREATED"`
|
||||
Updated time.Time `xorm:"UPDATED"`
|
||||
Id int64
|
||||
OwnerId int64 `xorm:"UNIQUE(s) INDEX NOT NULL"`
|
||||
Name string `xorm:"UNIQUE(s) NOT NULL"`
|
||||
Fingerprint string `xorm:"INDEX NOT NULL"`
|
||||
Content string `xorm:"TEXT NOT NULL"`
|
||||
Created time.Time `xorm:"CREATED"`
|
||||
Updated time.Time
|
||||
HasRecentActivity bool `xorm:"-"`
|
||||
HasUsed bool `xorm:"-"`
|
||||
}
|
||||
|
||||
// GenAuthorizedKey returns formatted public key string.
|
||||
func GenAuthorizedKey(keyId int64, key string) string {
|
||||
return fmt.Sprintf(TPL_PUBLICK_KEY+"\n", appPath, keyId, key)
|
||||
// OmitEmail returns content of public key but without e-mail address.
|
||||
func (k *PublicKey) OmitEmail() string {
|
||||
return strings.Join(strings.Split(k.Content, " ")[:2], " ")
|
||||
}
|
||||
|
||||
// AddPublicKey adds new public key to database and SSH key file.
|
||||
// GetAuthorizedString generates and returns formatted public key string for authorized_keys file.
|
||||
func (key *PublicKey) GetAuthorizedString() string {
|
||||
return fmt.Sprintf(_TPL_PUBLICK_KEY, appPath, key.Id, key.Content)
|
||||
}
|
||||
|
||||
var (
|
||||
MinimumKeySize = map[string]int{
|
||||
"(ED25519)": 256,
|
||||
"(ECDSA)": 256,
|
||||
"(NTRU)": 1087,
|
||||
"(MCE)": 1702,
|
||||
"(McE)": 1702,
|
||||
"(RSA)": 2048,
|
||||
"(DSA)": 1024,
|
||||
}
|
||||
)
|
||||
|
||||
// CheckPublicKeyString checks if the given public key string is recognized by SSH.
|
||||
func CheckPublicKeyString(content string) (bool, error) {
|
||||
content = strings.TrimRight(content, "\n\r")
|
||||
if strings.ContainsAny(content, "\n\r") {
|
||||
return false, errors.New("only a single line with a single key please")
|
||||
}
|
||||
|
||||
// write the key to a file…
|
||||
tmpFile, err := ioutil.TempFile(os.TempDir(), "keytest")
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
tmpPath := tmpFile.Name()
|
||||
defer os.Remove(tmpPath)
|
||||
tmpFile.WriteString(content)
|
||||
tmpFile.Close()
|
||||
|
||||
// Check if ssh-keygen recognizes its contents.
|
||||
stdout, stderr, err := process.Exec("CheckPublicKeyString", "ssh-keygen", "-l", "-f", tmpPath)
|
||||
if err != nil {
|
||||
return false, errors.New("ssh-keygen -l -f: " + stderr)
|
||||
} else if len(stdout) < 2 {
|
||||
return false, errors.New("ssh-keygen returned not enough output to evaluate the key: " + stdout)
|
||||
}
|
||||
|
||||
// The ssh-keygen in Windows does not print key type, so no need go further.
|
||||
if setting.IsWindows {
|
||||
return true, nil
|
||||
}
|
||||
|
||||
fmt.Println(stdout)
|
||||
sshKeygenOutput := strings.Split(stdout, " ")
|
||||
if len(sshKeygenOutput) < 4 {
|
||||
return false, ErrKeyUnableVerify
|
||||
}
|
||||
|
||||
// Check if key type and key size match.
|
||||
keySize := com.StrTo(sshKeygenOutput[0]).MustInt()
|
||||
if keySize == 0 {
|
||||
return false, errors.New("cannot get key size of the given key")
|
||||
}
|
||||
keyType := strings.TrimSpace(sshKeygenOutput[len(sshKeygenOutput)-1])
|
||||
if minimumKeySize := MinimumKeySize[keyType]; minimumKeySize == 0 {
|
||||
return false, errors.New("sorry, unrecognized public key type")
|
||||
} else if keySize < minimumKeySize {
|
||||
return false, fmt.Errorf("the minimum accepted size of a public key %s is %d", keyType, minimumKeySize)
|
||||
}
|
||||
|
||||
return true, nil
|
||||
}
|
||||
|
||||
// saveAuthorizedKeyFile writes SSH key content to authorized_keys file.
|
||||
func saveAuthorizedKeyFile(key *PublicKey) error {
|
||||
sshOpLocker.Lock()
|
||||
defer sshOpLocker.Unlock()
|
||||
|
||||
fpath := filepath.Join(SshPath, "authorized_keys")
|
||||
f, err := os.OpenFile(fpath, os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0600)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer f.Close()
|
||||
finfo, err := f.Stat()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// FIXME: following command does not support in Windows.
|
||||
if !setting.IsWindows {
|
||||
if finfo.Mode().Perm() > 0600 {
|
||||
log.Error(4, "authorized_keys file has unusual permission flags: %s - setting to -rw-------", finfo.Mode().Perm().String())
|
||||
if err = f.Chmod(0600); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_, err = f.WriteString(key.GetAuthorizedString())
|
||||
return err
|
||||
}
|
||||
|
||||
// AddPublicKey adds new public key to database and authorized_keys file.
|
||||
func AddPublicKey(key *PublicKey) (err error) {
|
||||
// Check if public key name has been used.
|
||||
has, err := orm.Get(key)
|
||||
has, err := x.Get(key)
|
||||
if err != nil {
|
||||
return err
|
||||
} else if has {
|
||||
@@ -101,26 +202,29 @@ func AddPublicKey(key *PublicKey) (err error) {
|
||||
}
|
||||
|
||||
// Calculate fingerprint.
|
||||
tmpPath := strings.Replace(filepath.Join(os.TempDir(), fmt.Sprintf("%d", time.Now().Nanosecond()),
|
||||
tmpPath := strings.Replace(path.Join(os.TempDir(), fmt.Sprintf("%d", time.Now().Nanosecond()),
|
||||
"id_rsa.pub"), "\\", "/", -1)
|
||||
os.MkdirAll(path.Dir(tmpPath), os.ModePerm)
|
||||
if err = ioutil.WriteFile(tmpPath, []byte(key.Content), os.ModePerm); err != nil {
|
||||
return err
|
||||
}
|
||||
stdout, stderr, err := com.ExecCmd("ssh-keygen", "-l", "-f", tmpPath)
|
||||
stdout, stderr, err := process.Exec("AddPublicKey", "ssh-keygen", "-l", "-f", tmpPath)
|
||||
if err != nil {
|
||||
return errors.New("ssh-keygen -l -f: " + stderr)
|
||||
} else if len(stdout) < 2 {
|
||||
return errors.New("Not enough output for calculating fingerprint")
|
||||
return errors.New("not enough output for calculating fingerprint: " + stdout)
|
||||
}
|
||||
key.Fingerprint = strings.Split(stdout, " ")[1]
|
||||
if has, err := x.Get(&PublicKey{Fingerprint: key.Fingerprint}); err == nil && has {
|
||||
return ErrKeyAlreadyExist
|
||||
}
|
||||
|
||||
// Save SSH key.
|
||||
if _, err = orm.Insert(key); err != nil {
|
||||
if _, err = x.Insert(key); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = SaveAuthorizedKeyFile(key); err != nil {
|
||||
if _, err2 := orm.Delete(key); err2 != nil {
|
||||
} else if err = saveAuthorizedKeyFile(key); err != nil {
|
||||
// Roll back.
|
||||
if _, err2 := x.Delete(key); err2 != nil {
|
||||
return err2
|
||||
}
|
||||
return err
|
||||
@@ -129,8 +233,35 @@ func AddPublicKey(key *PublicKey) (err error) {
|
||||
return nil
|
||||
}
|
||||
|
||||
// GetPublicKeyById returns public key by given ID.
|
||||
func GetPublicKeyById(keyId int64) (*PublicKey, error) {
|
||||
key := new(PublicKey)
|
||||
has, err := x.Id(keyId).Get(key)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
} else if !has {
|
||||
return nil, ErrKeyNotExist
|
||||
}
|
||||
return key, nil
|
||||
}
|
||||
|
||||
// ListPublicKeys returns a list of public keys belongs to given user.
|
||||
func ListPublicKeys(uid int64) ([]*PublicKey, error) {
|
||||
keys := make([]*PublicKey, 0, 5)
|
||||
err := x.Where("owner_id=?", uid).Find(&keys)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
for _, key := range keys {
|
||||
key.HasUsed = key.Updated.After(key.Created)
|
||||
key.HasRecentActivity = key.Updated.Add(7 * 24 * time.Hour).After(time.Now())
|
||||
}
|
||||
return keys, nil
|
||||
}
|
||||
|
||||
// rewriteAuthorizedKeys finds and deletes corresponding line in authorized_keys file.
|
||||
func rewriteAuthorizedKeys(key *PublicKey, p, tmpP string) error {
|
||||
// Delete SSH key in SSH key file.
|
||||
sshOpLocker.Lock()
|
||||
defer sshOpLocker.Unlock()
|
||||
|
||||
@@ -140,12 +271,14 @@ func rewriteAuthorizedKeys(key *PublicKey, p, tmpP string) error {
|
||||
}
|
||||
defer fr.Close()
|
||||
|
||||
fw, err := os.Create(tmpP)
|
||||
fw, err := os.OpenFile(tmpP, os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0600)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer fw.Close()
|
||||
|
||||
isFound := false
|
||||
keyword := fmt.Sprintf("key-%d", key.Id)
|
||||
buf := bufio.NewReader(fr)
|
||||
for {
|
||||
line, errRead := buf.ReadString('\n')
|
||||
@@ -164,7 +297,8 @@ func rewriteAuthorizedKeys(key *PublicKey, p, tmpP string) error {
|
||||
}
|
||||
|
||||
// Found the line and copy rest of file.
|
||||
if strings.Contains(line, fmt.Sprintf("key-%d", key.Id)) && strings.Contains(line, key.Content) {
|
||||
if !isFound && strings.Contains(line, keyword) && strings.Contains(line, key.Content) {
|
||||
isFound = true
|
||||
continue
|
||||
}
|
||||
// Still finding the line, copy the line that currently read.
|
||||
@@ -179,50 +313,31 @@ func rewriteAuthorizedKeys(key *PublicKey, p, tmpP string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// UpdatePublicKey updates given public key.
|
||||
func UpdatePublicKey(key *PublicKey) error {
|
||||
_, err := x.Id(key.Id).AllCols().Update(key)
|
||||
return err
|
||||
}
|
||||
|
||||
// DeletePublicKey deletes SSH key information both in database and authorized_keys file.
|
||||
func DeletePublicKey(key *PublicKey) (err error) {
|
||||
// Delete SSH key in database.
|
||||
has, err := orm.Id(key.Id).Get(key)
|
||||
func DeletePublicKey(key *PublicKey) error {
|
||||
has, err := x.Get(key)
|
||||
if err != nil {
|
||||
return err
|
||||
} else if !has {
|
||||
return errors.New("Public key does not exist")
|
||||
return ErrKeyNotExist
|
||||
}
|
||||
if _, err = orm.Delete(key); err != nil {
|
||||
|
||||
if _, err = x.Delete(key); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
p := filepath.Join(sshPath, "authorized_keys")
|
||||
tmpP := filepath.Join(sshPath, "authorized_keys.tmp")
|
||||
log.Trace("ssh.DeletePublicKey(authorized_keys): %s", p)
|
||||
|
||||
if err = rewriteAuthorizedKeys(key, p, tmpP); err != nil {
|
||||
fpath := filepath.Join(SshPath, "authorized_keys")
|
||||
tmpPath := filepath.Join(SshPath, "authorized_keys.tmp")
|
||||
if err = rewriteAuthorizedKeys(key, fpath, tmpPath); err != nil {
|
||||
return err
|
||||
} else if err = os.Remove(p); err != nil {
|
||||
} else if err = os.Remove(fpath); err != nil {
|
||||
return err
|
||||
}
|
||||
return os.Rename(tmpP, p)
|
||||
}
|
||||
|
||||
// ListPublicKey returns a list of public keys that user has.
|
||||
func ListPublicKey(userId int64) ([]PublicKey, error) {
|
||||
keys := make([]PublicKey, 0)
|
||||
err := orm.Find(&keys, &PublicKey{OwnerId: userId})
|
||||
return keys, err
|
||||
}
|
||||
|
||||
// SaveAuthorizedKeyFile writes SSH key content to SSH key file.
|
||||
func SaveAuthorizedKeyFile(key *PublicKey) error {
|
||||
sshOpLocker.Lock()
|
||||
defer sshOpLocker.Unlock()
|
||||
|
||||
p := filepath.Join(sshPath, "authorized_keys")
|
||||
f, err := os.OpenFile(p, os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0600)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer f.Close()
|
||||
|
||||
_, err = f.WriteString(GenAuthorizedKey(key.Id, key.Content))
|
||||
return err
|
||||
return os.Rename(tmpPath, fpath)
|
||||
}
|
||||
|
||||
@@ -6,15 +6,16 @@ package models
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"sort"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/Unknwon/com"
|
||||
"github.com/gogits/git"
|
||||
"github.com/gogits/gogs/modules/git"
|
||||
)
|
||||
|
||||
var (
|
||||
ErrReleaseAlreadyExist = errors.New("Release already exist")
|
||||
ErrReleaseNotExist = errors.New("Release does not exist")
|
||||
)
|
||||
|
||||
// Release represents a release of repository.
|
||||
@@ -23,21 +24,17 @@ type Release struct {
|
||||
RepoId int64
|
||||
PublisherId int64
|
||||
Publisher *User `xorm:"-"`
|
||||
Title string
|
||||
TagName string
|
||||
LowerTagName string
|
||||
SHA1 string
|
||||
Target string
|
||||
Title string
|
||||
Sha1 string `xorm:"VARCHAR(40)"`
|
||||
NumCommits int
|
||||
NumCommitsBehind int `xorm:"-"`
|
||||
Note string `xorm:"TEXT"`
|
||||
IsDraft bool `xorm:"NOT NULL DEFAULT false"`
|
||||
IsPrerelease bool
|
||||
Created time.Time `xorm:"created"`
|
||||
}
|
||||
|
||||
// GetReleasesByRepoId returns a list of releases of repository.
|
||||
func GetReleasesByRepoId(repoId int64) (rels []*Release, err error) {
|
||||
err = orm.Desc("created").Find(&rels, Release{RepoId: repoId})
|
||||
return rels, err
|
||||
Created time.Time `xorm:"CREATED"`
|
||||
}
|
||||
|
||||
// IsReleaseExist returns true if release with given tag name already exists.
|
||||
@@ -46,11 +43,38 @@ func IsReleaseExist(repoId int64, tagName string) (bool, error) {
|
||||
return false, nil
|
||||
}
|
||||
|
||||
return orm.Get(&Release{RepoId: repoId, LowerTagName: strings.ToLower(tagName)})
|
||||
return x.Get(&Release{RepoId: repoId, LowerTagName: strings.ToLower(tagName)})
|
||||
}
|
||||
|
||||
func createTag(gitRepo *git.Repository, rel *Release) error {
|
||||
// Only actual create when publish.
|
||||
if !rel.IsDraft {
|
||||
if !gitRepo.IsTagExist(rel.TagName) {
|
||||
commit, err := gitRepo.GetCommitOfBranch(rel.Target)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err = gitRepo.CreateTag(rel.TagName, commit.Id.String()); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
commit, err := gitRepo.GetCommitOfTag(rel.TagName)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
rel.NumCommits, err = commit.CommitsCount()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// CreateRelease creates a new release of repository.
|
||||
func CreateRelease(repoPath string, rel *Release, gitRepo *git.Repository) error {
|
||||
func CreateRelease(gitRepo *git.Repository, rel *Release) error {
|
||||
isExist, err := IsReleaseExist(rel.RepoId, rel.TagName)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -58,26 +82,65 @@ func CreateRelease(repoPath string, rel *Release, gitRepo *git.Repository) error
|
||||
return ErrReleaseAlreadyExist
|
||||
}
|
||||
|
||||
if !git.IsTagExist(repoPath, rel.TagName) {
|
||||
_, stderr, err := com.ExecCmdDir(repoPath, "git", "tag", rel.TagName, "-m", rel.Title)
|
||||
if err != nil {
|
||||
return err
|
||||
} else if strings.Contains(stderr, "fatal:") {
|
||||
return errors.New(stderr)
|
||||
}
|
||||
} else {
|
||||
commit, err := gitRepo.GetCommitOfTag(rel.TagName)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
rel.NumCommits, err = commit.CommitsCount()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err = createTag(gitRepo, rel); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
rel.LowerTagName = strings.ToLower(rel.TagName)
|
||||
_, err = orm.InsertOne(rel)
|
||||
_, err = x.InsertOne(rel)
|
||||
return err
|
||||
}
|
||||
|
||||
// GetRelease returns release by given ID.
|
||||
func GetRelease(repoId int64, tagName string) (*Release, error) {
|
||||
isExist, err := IsReleaseExist(repoId, tagName)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
} else if !isExist {
|
||||
return nil, ErrReleaseNotExist
|
||||
}
|
||||
|
||||
rel := &Release{RepoId: repoId, LowerTagName: strings.ToLower(tagName)}
|
||||
_, err = x.Get(rel)
|
||||
return rel, err
|
||||
}
|
||||
|
||||
// GetReleasesByRepoId returns a list of releases of repository.
|
||||
func GetReleasesByRepoId(repoId int64) (rels []*Release, err error) {
|
||||
err = x.Desc("created").Find(&rels, Release{RepoId: repoId})
|
||||
return rels, err
|
||||
}
|
||||
|
||||
type ReleaseSorter struct {
|
||||
rels []*Release
|
||||
}
|
||||
|
||||
func (rs *ReleaseSorter) Len() int {
|
||||
return len(rs.rels)
|
||||
}
|
||||
|
||||
func (rs *ReleaseSorter) Less(i, j int) bool {
|
||||
diffNum := rs.rels[i].NumCommits - rs.rels[j].NumCommits
|
||||
if diffNum != 0 {
|
||||
return diffNum > 0
|
||||
}
|
||||
return rs.rels[i].Created.After(rs.rels[j].Created)
|
||||
}
|
||||
|
||||
func (rs *ReleaseSorter) Swap(i, j int) {
|
||||
rs.rels[i], rs.rels[j] = rs.rels[j], rs.rels[i]
|
||||
}
|
||||
|
||||
// SortReleases sorts releases by number of commits and created time.
|
||||
func SortReleases(rels []*Release) {
|
||||
sorter := &ReleaseSorter{rels: rels}
|
||||
sort.Sort(sorter)
|
||||
}
|
||||
|
||||
// UpdateRelease updates information of a release.
|
||||
func UpdateRelease(gitRepo *git.Repository, rel *Release) (err error) {
|
||||
if err = createTag(gitRepo, rel); err != nil {
|
||||
return err
|
||||
}
|
||||
_, err = x.Id(rel.Id).AllCols().Update(rel)
|
||||
return err
|
||||
}
|
||||
|
||||
1406
models/repo.go
1406
models/repo.go
File diff suppressed because it is too large
Load Diff
115
models/slack.go
Normal file
115
models/slack.go
Normal file
@@ -0,0 +1,115 @@
|
||||
// Copyright 2014 The Gogs Authors. All rights reserved.
|
||||
// Use of this source code is governed by a MIT-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package models
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"strings"
|
||||
)
|
||||
|
||||
const (
|
||||
SLACK_COLOR string = "#dd4b39"
|
||||
)
|
||||
|
||||
type Slack struct {
|
||||
Channel string `json:"channel"`
|
||||
}
|
||||
|
||||
type SlackPayload struct {
|
||||
Channel string `json:"channel"`
|
||||
Text string `json:"text"`
|
||||
Username string `json:"username"`
|
||||
IconUrl string `json:"icon_url"`
|
||||
UnfurlLinks int `json:"unfurl_links"`
|
||||
LinkNames int `json:"link_names"`
|
||||
Attachments []SlackAttachment `json:"attachments"`
|
||||
}
|
||||
|
||||
type SlackAttachment struct {
|
||||
Color string `json:"color"`
|
||||
Text string `json:"text"`
|
||||
}
|
||||
|
||||
func (p SlackPayload) GetJSONPayload() ([]byte, error) {
|
||||
data, err := json.Marshal(p)
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return data, nil
|
||||
}
|
||||
|
||||
func GetSlackPayload(p *Payload, meta string) (*SlackPayload, error) {
|
||||
slack := &Slack{}
|
||||
slackPayload := &SlackPayload{}
|
||||
if err := json.Unmarshal([]byte(meta), &slack); err != nil {
|
||||
return slackPayload, errors.New("GetSlackPayload meta json:" + err.Error())
|
||||
}
|
||||
|
||||
// TODO: handle different payload types: push, new branch, delete branch etc.
|
||||
// when they are added to gogs. Only handles push now
|
||||
return getSlackPushPayload(p, slack)
|
||||
}
|
||||
|
||||
func getSlackPushPayload(p *Payload, slack *Slack) (*SlackPayload, error) {
|
||||
// n new commits
|
||||
refSplit := strings.Split(p.Ref, "/")
|
||||
branchName := refSplit[len(refSplit)-1]
|
||||
var commitString string
|
||||
|
||||
if len(p.Commits) == 1 {
|
||||
commitString = "1 new commit"
|
||||
if p.CompareUrl != "" {
|
||||
commitString = SlackLinkFormatter(p.CompareUrl, commitString)
|
||||
}
|
||||
} else {
|
||||
commitString = fmt.Sprintf("%d new commits", len(p.Commits))
|
||||
if p.CompareUrl != "" {
|
||||
commitString = SlackLinkFormatter(p.CompareUrl, commitString)
|
||||
}
|
||||
}
|
||||
|
||||
repoLink := SlackLinkFormatter(p.Repo.Url, p.Repo.Name)
|
||||
branchLink := SlackLinkFormatter(p.Repo.Url+"/src/"+branchName, branchName)
|
||||
text := fmt.Sprintf("[%s:%s] %s pushed by %s", repoLink, branchLink, commitString, p.Pusher.Name)
|
||||
var attachmentText string
|
||||
|
||||
// for each commit, generate attachment text
|
||||
for i, commit := range p.Commits {
|
||||
attachmentText += fmt.Sprintf("%s: %s - %s", SlackLinkFormatter(commit.Url, commit.Id[:7]), SlackTextFormatter(commit.Message), SlackTextFormatter(commit.Author.Name))
|
||||
// add linebreak to each commit but the last
|
||||
if i < len(p.Commits)-1 {
|
||||
attachmentText += "\n"
|
||||
}
|
||||
}
|
||||
|
||||
slackAttachments := []SlackAttachment{{Color: SLACK_COLOR, Text: attachmentText}}
|
||||
|
||||
return &SlackPayload{
|
||||
Channel: slack.Channel,
|
||||
Text: text,
|
||||
Username: "gogs",
|
||||
IconUrl: "https://raw.githubusercontent.com/gogits/gogs/master/public/img/favicon.png",
|
||||
UnfurlLinks: 0,
|
||||
LinkNames: 0,
|
||||
Attachments: slackAttachments,
|
||||
}, nil
|
||||
}
|
||||
|
||||
// see: https://api.slack.com/docs/formatting
|
||||
func SlackTextFormatter(s string) string {
|
||||
// take only first line of commit
|
||||
first := strings.Split(s, "\n")[0]
|
||||
// replace & < >
|
||||
first = strings.Replace(first, "&", "&", -1)
|
||||
first = strings.Replace(first, "<", "<", -1)
|
||||
first = strings.Replace(first, ">", ">", -1)
|
||||
return first
|
||||
}
|
||||
|
||||
func SlackLinkFormatter(url string, text string) string {
|
||||
return fmt.Sprintf("<%s|%s>", url, SlackTextFormatter(text))
|
||||
}
|
||||
69
models/token.go
Normal file
69
models/token.go
Normal file
@@ -0,0 +1,69 @@
|
||||
// Copyright 2014 The Gogs Authors. All rights reserved.
|
||||
// Use of this source code is governed by a MIT-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package models
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"time"
|
||||
|
||||
"github.com/gogits/gogs/modules/base"
|
||||
"github.com/gogits/gogs/modules/uuid"
|
||||
)
|
||||
|
||||
var (
|
||||
ErrAccessTokenNotExist = errors.New("Access token does not exist")
|
||||
)
|
||||
|
||||
// AccessToken represents a personal access token.
|
||||
type AccessToken struct {
|
||||
Id int64
|
||||
Uid int64
|
||||
Name string
|
||||
Sha1 string `xorm:"UNIQUE VARCHAR(40)"`
|
||||
Created time.Time `xorm:"CREATED"`
|
||||
Updated time.Time
|
||||
HasRecentActivity bool `xorm:"-"`
|
||||
HasUsed bool `xorm:"-"`
|
||||
}
|
||||
|
||||
// NewAccessToken creates new access token.
|
||||
func NewAccessToken(t *AccessToken) error {
|
||||
t.Sha1 = base.EncodeSha1(uuid.NewV4().String())
|
||||
_, err := x.Insert(t)
|
||||
return err
|
||||
}
|
||||
|
||||
// GetAccessTokenBySha returns access token by given sha1.
|
||||
func GetAccessTokenBySha(sha string) (*AccessToken, error) {
|
||||
t := &AccessToken{Sha1: sha}
|
||||
has, err := x.Get(t)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
} else if !has {
|
||||
return nil, ErrAccessTokenNotExist
|
||||
}
|
||||
return t, nil
|
||||
}
|
||||
|
||||
// ListAccessTokens returns a list of access tokens belongs to given user.
|
||||
func ListAccessTokens(uid int64) ([]*AccessToken, error) {
|
||||
tokens := make([]*AccessToken, 0, 5)
|
||||
err := x.Where("uid=?", uid).Desc("id").Find(&tokens)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
for _, t := range tokens {
|
||||
t.HasUsed = t.Updated.After(t.Created)
|
||||
t.HasRecentActivity = t.Updated.Add(7 * 24 * time.Hour).After(time.Now())
|
||||
}
|
||||
return tokens, nil
|
||||
}
|
||||
|
||||
// DeleteAccessTokenById deletes access token by given ID.
|
||||
func DeleteAccessTokenById(id int64) error {
|
||||
_, err := x.Id(id).Delete(new(AccessToken))
|
||||
return err
|
||||
}
|
||||
123
models/update.go
123
models/update.go
@@ -6,69 +6,140 @@ package models
|
||||
|
||||
import (
|
||||
"container/list"
|
||||
"fmt"
|
||||
"os/exec"
|
||||
"strings"
|
||||
|
||||
qlog "github.com/qiniu/log"
|
||||
|
||||
"github.com/gogits/git"
|
||||
|
||||
"github.com/gogits/gogs/modules/base"
|
||||
"github.com/gogits/gogs/modules/git"
|
||||
"github.com/gogits/gogs/modules/log"
|
||||
)
|
||||
|
||||
func Update(refName, oldCommitId, newCommitId, userName, repoName string, userId int64) {
|
||||
type UpdateTask struct {
|
||||
Id int64
|
||||
Uuid string `xorm:"index"`
|
||||
RefName string
|
||||
OldCommitId string
|
||||
NewCommitId string
|
||||
}
|
||||
|
||||
const (
|
||||
MAX_COMMITS int = 5
|
||||
)
|
||||
|
||||
func AddUpdateTask(task *UpdateTask) error {
|
||||
_, err := x.Insert(task)
|
||||
return err
|
||||
}
|
||||
|
||||
func GetUpdateTasksByUuid(uuid string) ([]*UpdateTask, error) {
|
||||
task := &UpdateTask{
|
||||
Uuid: uuid,
|
||||
}
|
||||
tasks := make([]*UpdateTask, 0)
|
||||
err := x.Find(&tasks, task)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return tasks, nil
|
||||
}
|
||||
|
||||
func DelUpdateTasksByUuid(uuid string) error {
|
||||
_, err := x.Delete(&UpdateTask{Uuid: uuid})
|
||||
return err
|
||||
}
|
||||
|
||||
func Update(refName, oldCommitId, newCommitId, userName, repoUserName, repoName string, userId int64) error {
|
||||
isNew := strings.HasPrefix(oldCommitId, "0000000")
|
||||
if isNew &&
|
||||
strings.HasPrefix(newCommitId, "0000000") {
|
||||
qlog.Fatal("old rev and new rev both 000000")
|
||||
return fmt.Errorf("old rev and new rev both 000000")
|
||||
}
|
||||
|
||||
f := RepoPath(userName, repoName)
|
||||
f := RepoPath(repoUserName, repoName)
|
||||
|
||||
gitUpdate := exec.Command("git", "update-server-info")
|
||||
gitUpdate.Dir = f
|
||||
gitUpdate.Run()
|
||||
|
||||
isDel := strings.HasPrefix(newCommitId, "0000000")
|
||||
if isDel {
|
||||
log.GitLogger.Info("del rev", refName, "from", userName+"/"+repoName+".git", "by", userId)
|
||||
return nil
|
||||
}
|
||||
|
||||
repo, err := git.OpenRepository(f)
|
||||
if err != nil {
|
||||
qlog.Fatalf("runUpdate.Open repoId: %v", err)
|
||||
return fmt.Errorf("runUpdate.Open repoId: %v", err)
|
||||
}
|
||||
|
||||
ru, err := GetUserByName(repoUserName)
|
||||
if err != nil {
|
||||
return fmt.Errorf("runUpdate.GetUserByName: %v", err)
|
||||
}
|
||||
|
||||
repos, err := GetRepositoryByName(ru.Id, repoName)
|
||||
if err != nil {
|
||||
return fmt.Errorf("runUpdate.GetRepositoryByName userId: %v", err)
|
||||
}
|
||||
|
||||
// Push tags.
|
||||
if strings.HasPrefix(refName, "refs/tags/") {
|
||||
tagName := git.RefEndName(refName)
|
||||
tag, err := repo.GetTag(tagName)
|
||||
if err != nil {
|
||||
log.GitLogger.Fatal(4, "runUpdate.GetTag: %v", err)
|
||||
}
|
||||
|
||||
var actEmail string
|
||||
if tag.Tagger != nil {
|
||||
actEmail = tag.Tagger.Email
|
||||
} else {
|
||||
cmt, err := tag.Commit()
|
||||
if err != nil {
|
||||
log.GitLogger.Fatal(4, "runUpdate.GetTag Commit: %v", err)
|
||||
}
|
||||
actEmail = cmt.Committer.Email
|
||||
}
|
||||
|
||||
commit := &base.PushCommits{}
|
||||
|
||||
if err = CommitRepoAction(userId, ru.Id, userName, actEmail,
|
||||
repos.Id, repoUserName, repoName, refName, commit, oldCommitId, newCommitId); err != nil {
|
||||
log.GitLogger.Fatal(4, "CommitRepoAction: %s/%s:%v", repoUserName, repoName, err)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
newCommit, err := repo.GetCommit(newCommitId)
|
||||
if err != nil {
|
||||
qlog.Fatalf("runUpdate GetCommit of newCommitId: %v", err)
|
||||
return
|
||||
return fmt.Errorf("runUpdate GetCommit of newCommitId: %v", err)
|
||||
}
|
||||
|
||||
// Push new branch.
|
||||
var l *list.List
|
||||
// if a new branch
|
||||
if isNew {
|
||||
l, err = newCommit.CommitsBefore()
|
||||
if err != nil {
|
||||
qlog.Fatalf("Find CommitsBefore erro: %v", err)
|
||||
return fmt.Errorf("Find CommitsBefore erro: %v", err)
|
||||
}
|
||||
} else {
|
||||
l, err = newCommit.CommitsBeforeUntil(oldCommitId)
|
||||
if err != nil {
|
||||
qlog.Fatalf("Find CommitsBeforeUntil erro: %v", err)
|
||||
return
|
||||
return fmt.Errorf("Find CommitsBeforeUntil erro: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
qlog.Fatalf("runUpdate.Commit repoId: %v", err)
|
||||
}
|
||||
|
||||
repos, err := GetRepositoryByName(userId, repoName)
|
||||
if err != nil {
|
||||
qlog.Fatalf("runUpdate.GetRepositoryByName userId: %v", err)
|
||||
return fmt.Errorf("runUpdate.Commit repoId: %v", err)
|
||||
}
|
||||
|
||||
// Push commits.
|
||||
commits := make([]*base.PushCommit, 0)
|
||||
var maxCommits = 3
|
||||
var actEmail string
|
||||
for e := l.Front(); e != nil; e = e.Next() {
|
||||
commit := e.Value.(*git.Commit)
|
||||
|
||||
if actEmail == "" {
|
||||
actEmail = commit.Committer.Email
|
||||
}
|
||||
@@ -77,14 +148,14 @@ func Update(refName, oldCommitId, newCommitId, userName, repoName string, userId
|
||||
commit.Message(),
|
||||
commit.Author.Email,
|
||||
commit.Author.Name})
|
||||
if len(commits) >= maxCommits {
|
||||
if len(commits) >= MAX_COMMITS {
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
//commits = append(commits, []string{lastCommit.Id().String(), lastCommit.Message()})
|
||||
if err = CommitRepoAction(userId, userName, actEmail,
|
||||
repos.Id, repoName, refName, &base.PushCommits{l.Len(), commits}); err != nil {
|
||||
qlog.Fatalf("runUpdate.models.CommitRepoAction: %v", err)
|
||||
if err = CommitRepoAction(userId, ru.Id, userName, actEmail,
|
||||
repos.Id, repoUserName, repoName, refName, &base.PushCommits{l.Len(), commits, ""}, oldCommitId, newCommitId); err != nil {
|
||||
return fmt.Errorf("runUpdate.models.CommitRepoAction: %s/%s:%v", repoUserName, repoName, err)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
620
models/user.go
620
models/user.go
@@ -5,100 +5,233 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"container/list"
|
||||
"crypto/sha256"
|
||||
"encoding/hex"
|
||||
"errors"
|
||||
"fmt"
|
||||
"image"
|
||||
"image/jpeg"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/gogits/git"
|
||||
"github.com/Unknwon/com"
|
||||
"github.com/nfnt/resize"
|
||||
|
||||
"github.com/gogits/gogs/modules/avatar"
|
||||
"github.com/gogits/gogs/modules/base"
|
||||
"github.com/gogits/gogs/modules/git"
|
||||
"github.com/gogits/gogs/modules/log"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
)
|
||||
|
||||
// User types.
|
||||
const (
|
||||
UT_INDIVIDUAL = iota + 1
|
||||
UT_ORGANIZATION
|
||||
)
|
||||
type UserType int
|
||||
|
||||
// Login types.
|
||||
const (
|
||||
LT_PLAIN = iota + 1
|
||||
LT_LDAP
|
||||
INDIVIDUAL UserType = iota // Historic reason to make it starts at 0.
|
||||
ORGANIZATION
|
||||
)
|
||||
|
||||
var (
|
||||
ErrUserOwnRepos = errors.New("User still have ownership of repositories")
|
||||
ErrUserAlreadyExist = errors.New("User already exist")
|
||||
ErrUserNotExist = errors.New("User does not exist")
|
||||
ErrEmailAlreadyUsed = errors.New("E-mail already used")
|
||||
ErrUserNameIllegal = errors.New("User name contains illegal characters")
|
||||
ErrKeyNotExist = errors.New("Public key does not exist")
|
||||
ErrUserOwnRepos = errors.New("User still have ownership of repositories")
|
||||
ErrUserHasOrgs = errors.New("User still have membership of organization")
|
||||
ErrUserAlreadyExist = errors.New("User already exist")
|
||||
ErrUserNotExist = errors.New("User does not exist")
|
||||
ErrUserNotKeyOwner = errors.New("User does not the owner of public key")
|
||||
ErrEmailAlreadyUsed = errors.New("E-mail already used")
|
||||
ErrUserNameIllegal = errors.New("User name contains illegal characters")
|
||||
ErrLoginSourceNotExist = errors.New("Login source does not exist")
|
||||
ErrLoginSourceNotActived = errors.New("Login source is not actived")
|
||||
ErrUnsupportedLoginType = errors.New("Login source is unknown")
|
||||
)
|
||||
|
||||
// User represents the object of individual and member of organization.
|
||||
type User struct {
|
||||
Id int64
|
||||
LowerName string `xorm:"unique not null"`
|
||||
Name string `xorm:"unique not null"`
|
||||
Email string `xorm:"unique not null"`
|
||||
Passwd string `xorm:"not null"`
|
||||
LoginType int
|
||||
Type int
|
||||
Id int64
|
||||
LowerName string `xorm:"UNIQUE NOT NULL"`
|
||||
Name string `xorm:"UNIQUE NOT NULL"`
|
||||
FullName string
|
||||
Email string `xorm:"UNIQUE(s) NOT NULL"`
|
||||
Passwd string `xorm:"NOT NULL"`
|
||||
LoginType LoginType
|
||||
LoginSource int64 `xorm:"NOT NULL DEFAULT 0"`
|
||||
LoginName string
|
||||
Type UserType `xorm:"UNIQUE(s)"`
|
||||
Orgs []*User `xorm:"-"`
|
||||
Repos []*Repository `xorm:"-"`
|
||||
Location string
|
||||
Website string
|
||||
Rands string `xorm:"VARCHAR(10)"`
|
||||
Salt string `xorm:"VARCHAR(10)"`
|
||||
Created time.Time `xorm:"CREATED"`
|
||||
Updated time.Time `xorm:"UPDATED"`
|
||||
|
||||
// Permissions.
|
||||
IsActive bool
|
||||
IsAdmin bool
|
||||
AllowGitHook bool
|
||||
|
||||
// Avatar.
|
||||
Avatar string `xorm:"VARCHAR(2048) NOT NULL"`
|
||||
AvatarEmail string `xorm:"NOT NULL"`
|
||||
UseCustomAvatar bool
|
||||
|
||||
// Counters.
|
||||
NumFollowers int
|
||||
NumFollowings int
|
||||
NumStars int
|
||||
NumRepos int
|
||||
Avatar string `xorm:"varchar(2048) not null"`
|
||||
AvatarEmail string `xorm:"not null"`
|
||||
Location string
|
||||
Website string
|
||||
IsActive bool
|
||||
IsAdmin bool
|
||||
Rands string `xorm:"VARCHAR(10)"`
|
||||
Salt string `xorm:"VARCHAR(10)"`
|
||||
Created time.Time `xorm:"created"`
|
||||
Updated time.Time `xorm:"updated"`
|
||||
|
||||
// For organization.
|
||||
Description string
|
||||
NumTeams int
|
||||
NumMembers int
|
||||
Teams []*Team `xorm:"-"`
|
||||
Members []*User `xorm:"-"`
|
||||
}
|
||||
|
||||
// DashboardLink returns the user dashboard page link.
|
||||
func (u *User) DashboardLink() string {
|
||||
if u.IsOrganization() {
|
||||
return setting.AppSubUrl + "/org/" + u.Name + "/dashboard/"
|
||||
}
|
||||
return setting.AppSubUrl + "/"
|
||||
}
|
||||
|
||||
// HomeLink returns the user home page link.
|
||||
func (user *User) HomeLink() string {
|
||||
return "/user/" + user.Name
|
||||
func (u *User) HomeLink() string {
|
||||
return setting.AppSubUrl + "/" + u.Name
|
||||
}
|
||||
|
||||
// AvatarLink returns the user gravatar link.
|
||||
func (user *User) AvatarLink() string {
|
||||
if base.Service.EnableCacheAvatar {
|
||||
return "/avatar/" + user.Avatar
|
||||
// AvatarLink returns user gravatar link.
|
||||
func (u *User) AvatarLink() string {
|
||||
switch {
|
||||
case u.UseCustomAvatar:
|
||||
return setting.AppSubUrl + "/avatars/" + com.ToStr(u.Id)
|
||||
case setting.DisableGravatar:
|
||||
return setting.AppSubUrl + "/img/avatar_default.jpg"
|
||||
case setting.Service.EnableCacheAvatar:
|
||||
return setting.AppSubUrl + "/avatar/" + u.Avatar
|
||||
}
|
||||
return "//1.gravatar.com/avatar/" + user.Avatar
|
||||
return setting.GravatarSource + u.Avatar
|
||||
}
|
||||
|
||||
// NewGitSig generates and returns the signature of given user.
|
||||
func (user *User) NewGitSig() *git.Signature {
|
||||
func (u *User) NewGitSig() *git.Signature {
|
||||
return &git.Signature{
|
||||
Name: user.Name,
|
||||
Email: user.Email,
|
||||
Name: u.Name,
|
||||
Email: u.Email,
|
||||
When: time.Now(),
|
||||
}
|
||||
}
|
||||
|
||||
// EncodePasswd encodes password to safe format.
|
||||
func (user *User) EncodePasswd() {
|
||||
newPasswd := base.PBKDF2([]byte(user.Passwd), []byte(user.Salt), 10000, 50, sha256.New)
|
||||
user.Passwd = fmt.Sprintf("%x", newPasswd)
|
||||
func (u *User) EncodePasswd() {
|
||||
newPasswd := base.PBKDF2([]byte(u.Passwd), []byte(u.Salt), 10000, 50, sha256.New)
|
||||
u.Passwd = fmt.Sprintf("%x", newPasswd)
|
||||
}
|
||||
|
||||
// Member represents user is member of organization.
|
||||
type Member struct {
|
||||
Id int64
|
||||
OrgId int64 `xorm:"unique(member) index"`
|
||||
UserId int64 `xorm:"unique(member)"`
|
||||
// ValidtePassword checks if given password matches the one belongs to the user.
|
||||
func (u *User) ValidtePassword(passwd string) bool {
|
||||
newUser := &User{Passwd: passwd, Salt: u.Salt}
|
||||
newUser.EncodePasswd()
|
||||
return u.Passwd == newUser.Passwd
|
||||
}
|
||||
|
||||
// CustomAvatarPath returns user custom avatar file path.
|
||||
func (u *User) CustomAvatarPath() string {
|
||||
return filepath.Join(setting.AvatarUploadPath, com.ToStr(u.Id))
|
||||
}
|
||||
|
||||
// UploadAvatar saves custom avatar for user.
|
||||
// FIXME: split uploads to different subdirs in case we have massive users.
|
||||
func (u *User) UploadAvatar(data []byte) error {
|
||||
u.UseCustomAvatar = true
|
||||
|
||||
img, _, err := image.Decode(bytes.NewReader(data))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
m := resize.Resize(200, 200, img, resize.NearestNeighbor)
|
||||
|
||||
sess := x.NewSession()
|
||||
defer sess.Close()
|
||||
if err = sess.Begin(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if _, err = sess.Id(u.Id).AllCols().Update(u); err != nil {
|
||||
sess.Rollback()
|
||||
return err
|
||||
}
|
||||
|
||||
os.MkdirAll(setting.AvatarUploadPath, os.ModePerm)
|
||||
fw, err := os.Create(u.CustomAvatarPath())
|
||||
if err != nil {
|
||||
sess.Rollback()
|
||||
return err
|
||||
}
|
||||
defer fw.Close()
|
||||
if err = jpeg.Encode(fw, m, nil); err != nil {
|
||||
sess.Rollback()
|
||||
return err
|
||||
}
|
||||
|
||||
return sess.Commit()
|
||||
}
|
||||
|
||||
// IsOrganization returns true if user is actually a organization.
|
||||
func (u *User) IsOrganization() bool {
|
||||
return u.Type == ORGANIZATION
|
||||
}
|
||||
|
||||
// IsUserOrgOwner returns true if user is in the owner team of given organization.
|
||||
func (u *User) IsUserOrgOwner(orgId int64) bool {
|
||||
return IsOrganizationOwner(orgId, u.Id)
|
||||
}
|
||||
|
||||
// IsPublicMember returns true if user public his/her membership in give organization.
|
||||
func (u *User) IsPublicMember(orgId int64) bool {
|
||||
return IsPublicMembership(orgId, u.Id)
|
||||
}
|
||||
|
||||
// GetOrganizationCount returns count of membership of organization of user.
|
||||
func (u *User) GetOrganizationCount() (int64, error) {
|
||||
return x.Where("uid=?", u.Id).Count(new(OrgUser))
|
||||
}
|
||||
|
||||
// GetRepositories returns all repositories that user owns, including private repositories.
|
||||
func (u *User) GetRepositories() (err error) {
|
||||
u.Repos, err = GetRepositories(u.Id, true)
|
||||
return err
|
||||
}
|
||||
|
||||
// GetOrganizations returns all organizations that user belongs to.
|
||||
func (u *User) GetOrganizations() error {
|
||||
ous, err := GetOrgUsersByUserId(u.Id)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
u.Orgs = make([]*User, len(ous))
|
||||
for i, ou := range ous {
|
||||
u.Orgs[i], err = GetUserById(ou.OrgId)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// GetFullNameFallback returns Full Name if set, otherwise username
|
||||
func (u *User) GetFullNameFallback() string {
|
||||
if u.FullName == "" {
|
||||
return u.Name
|
||||
}
|
||||
return u.FullName
|
||||
}
|
||||
|
||||
// IsUserExist checks if given user name exist,
|
||||
@@ -107,7 +240,7 @@ func IsUserExist(name string) (bool, error) {
|
||||
if len(name) == 0 {
|
||||
return false, nil
|
||||
}
|
||||
return orm.Get(&User{LowerName: strings.ToLower(name)})
|
||||
return x.Get(&User{LowerName: strings.ToLower(name)})
|
||||
}
|
||||
|
||||
// IsEmailUsed returns true if the e-mail has been used.
|
||||
@@ -115,63 +248,76 @@ func IsEmailUsed(email string) (bool, error) {
|
||||
if len(email) == 0 {
|
||||
return false, nil
|
||||
}
|
||||
return orm.Get(&User{Email: email})
|
||||
return x.Get(&User{Email: email})
|
||||
}
|
||||
|
||||
// return a user salt token
|
||||
// GetUserSalt returns a ramdom user salt token.
|
||||
func GetUserSalt() string {
|
||||
return base.GetRandomString(10)
|
||||
}
|
||||
|
||||
// RegisterUser creates record of a new user.
|
||||
func RegisterUser(user *User) (*User, error) {
|
||||
|
||||
if !IsLegalName(user.Name) {
|
||||
return nil, ErrUserNameIllegal
|
||||
// CreateUser creates record of a new user.
|
||||
func CreateUser(u *User) error {
|
||||
if !IsLegalName(u.Name) {
|
||||
return ErrUserNameIllegal
|
||||
}
|
||||
|
||||
isExist, err := IsUserExist(user.Name)
|
||||
isExist, err := IsUserExist(u.Name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return err
|
||||
} else if isExist {
|
||||
return nil, ErrUserAlreadyExist
|
||||
return ErrUserAlreadyExist
|
||||
}
|
||||
|
||||
isExist, err = IsEmailUsed(user.Email)
|
||||
isExist, err = IsEmailUsed(u.Email)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return err
|
||||
} else if isExist {
|
||||
return nil, ErrEmailAlreadyUsed
|
||||
return ErrEmailAlreadyUsed
|
||||
}
|
||||
|
||||
user.LowerName = strings.ToLower(user.Name)
|
||||
user.Avatar = base.EncodeMd5(user.Email)
|
||||
user.AvatarEmail = user.Email
|
||||
user.Rands = GetUserSalt()
|
||||
user.Salt = GetUserSalt()
|
||||
user.EncodePasswd()
|
||||
if _, err = orm.Insert(user); err != nil {
|
||||
return nil, err
|
||||
} else if err = os.MkdirAll(UserPath(user.Name), os.ModePerm); err != nil {
|
||||
if _, err := orm.Id(user.Id).Delete(&User{}); err != nil {
|
||||
return nil, errors.New(fmt.Sprintf(
|
||||
"both create userpath %s and delete table record faild: %v", user.Name, err))
|
||||
}
|
||||
return nil, err
|
||||
u.LowerName = strings.ToLower(u.Name)
|
||||
u.AvatarEmail = u.Email
|
||||
u.Avatar = avatar.HashEmail(u.AvatarEmail)
|
||||
u.Rands = GetUserSalt()
|
||||
u.Salt = GetUserSalt()
|
||||
u.EncodePasswd()
|
||||
|
||||
sess := x.NewSession()
|
||||
defer sess.Close()
|
||||
if err = sess.Begin(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if user.Id == 1 {
|
||||
user.IsAdmin = true
|
||||
user.IsActive = true
|
||||
_, err = orm.Id(user.Id).UseBool().Update(user)
|
||||
if _, err = sess.Insert(u); err != nil {
|
||||
sess.Rollback()
|
||||
return err
|
||||
} else if err = os.MkdirAll(UserPath(u.Name), os.ModePerm); err != nil {
|
||||
sess.Rollback()
|
||||
return err
|
||||
} else if err = sess.Commit(); err != nil {
|
||||
return err
|
||||
}
|
||||
return user, err
|
||||
|
||||
// Auto-set admin for user whose ID is 1.
|
||||
if u.Id == 1 {
|
||||
u.IsAdmin = true
|
||||
u.IsActive = true
|
||||
_, err = x.Id(u.Id).UseBool().Update(u)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
// CountUsers returns number of users.
|
||||
func CountUsers() int64 {
|
||||
count, _ := x.Where("type=0").Count(new(User))
|
||||
return count
|
||||
}
|
||||
|
||||
// GetUsers returns given number of user objects with offset.
|
||||
func GetUsers(num, offset int) ([]User, error) {
|
||||
users := make([]User, 0, num)
|
||||
err := orm.Limit(num, offset).Asc("id").Find(&users)
|
||||
func GetUsers(num, offset int) ([]*User, error) {
|
||||
users := make([]*User, 0, num)
|
||||
err := x.Limit(num, offset).Where("type=0").Asc("id").Find(&users)
|
||||
return users, err
|
||||
}
|
||||
|
||||
@@ -187,7 +333,7 @@ func getVerifyUser(code string) (user *User) {
|
||||
if user, err = GetUserByName(string(b)); user != nil {
|
||||
return user
|
||||
}
|
||||
log.Error("user.getVerifyUser: %v", err)
|
||||
log.Error(4, "user.getVerifyUser: %v", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
@@ -195,12 +341,12 @@ func getVerifyUser(code string) (user *User) {
|
||||
|
||||
// verify active code when active account
|
||||
func VerifyUserActiveCode(code string) (user *User) {
|
||||
minutes := base.Service.ActiveCodeLives
|
||||
minutes := setting.Service.ActiveCodeLives
|
||||
|
||||
if user = getVerifyUser(code); user != nil {
|
||||
// time limit code
|
||||
prefix := code[:base.TimeLimitCodeLength]
|
||||
data := base.ToStr(user.Id) + user.Email + user.LowerName + user.Passwd + user.Rands
|
||||
data := com.ToStr(user.Id) + user.Email + user.LowerName + user.Passwd + user.Rands
|
||||
|
||||
if base.VerifyTimeLimitCode(data, minutes, prefix) {
|
||||
return user
|
||||
@@ -210,16 +356,20 @@ func VerifyUserActiveCode(code string) (user *User) {
|
||||
}
|
||||
|
||||
// ChangeUserName changes all corresponding setting from old user name to new one.
|
||||
func ChangeUserName(user *User, newUserName string) (err error) {
|
||||
func ChangeUserName(u *User, newUserName string) (err error) {
|
||||
if !IsLegalName(newUserName) {
|
||||
return ErrUserNameIllegal
|
||||
}
|
||||
|
||||
newUserName = strings.ToLower(newUserName)
|
||||
|
||||
// Update accesses of user.
|
||||
accesses := make([]Access, 0, 10)
|
||||
if err = orm.Find(&accesses, &Access{UserName: user.LowerName}); err != nil {
|
||||
if err = x.Find(&accesses, &Access{UserName: u.LowerName}); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
sess := orm.NewSession()
|
||||
sess := x.NewSession()
|
||||
defer sess.Close()
|
||||
if err = sess.Begin(); err != nil {
|
||||
return err
|
||||
@@ -227,35 +377,38 @@ func ChangeUserName(user *User, newUserName string) (err error) {
|
||||
|
||||
for i := range accesses {
|
||||
accesses[i].UserName = newUserName
|
||||
if strings.HasPrefix(accesses[i].RepoName, user.LowerName+"/") {
|
||||
accesses[i].RepoName = strings.Replace(accesses[i].RepoName, user.LowerName, newUserName, 1)
|
||||
if err = UpdateAccessWithSession(sess, &accesses[i]); err != nil {
|
||||
return err
|
||||
}
|
||||
if strings.HasPrefix(accesses[i].RepoName, u.LowerName+"/") {
|
||||
accesses[i].RepoName = strings.Replace(accesses[i].RepoName, u.LowerName, newUserName, 1)
|
||||
}
|
||||
if err = UpdateAccessWithSession(sess, &accesses[i]); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
repos, err := GetRepositories(user, true)
|
||||
repos, err := GetRepositories(u.Id, true)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
for i := range repos {
|
||||
accesses = make([]Access, 0, 10)
|
||||
// Update accesses of user repository.
|
||||
if err = orm.Find(&accesses, &Access{RepoName: user.LowerName + "/" + repos[i].LowerName}); err != nil {
|
||||
if err = x.Find(&accesses, &Access{RepoName: u.LowerName + "/" + repos[i].LowerName}); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for j := range accesses {
|
||||
accesses[j].RepoName = newUserName + "/" + repos[i].LowerName
|
||||
if err = UpdateAccessWithSession(sess, &accesses[j]); err != nil {
|
||||
return err
|
||||
// if the access is not the user's access (already updated above)
|
||||
if accesses[j].UserName != u.LowerName {
|
||||
accesses[j].RepoName = newUserName + "/" + repos[i].LowerName
|
||||
if err = UpdateAccessWithSession(sess, &accesses[j]); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Change user directory name.
|
||||
if err = os.Rename(UserPath(user.LowerName), UserPath(newUserName)); err != nil {
|
||||
if err = os.Rename(UserPath(u.LowerName), UserPath(newUserName)); err != nil {
|
||||
sess.Rollback()
|
||||
return err
|
||||
}
|
||||
@@ -264,124 +417,148 @@ func ChangeUserName(user *User, newUserName string) (err error) {
|
||||
}
|
||||
|
||||
// UpdateUser updates user's information.
|
||||
func UpdateUser(user *User) (err error) {
|
||||
user.LowerName = strings.ToLower(user.Name)
|
||||
|
||||
if len(user.Location) > 255 {
|
||||
user.Location = user.Location[:255]
|
||||
}
|
||||
if len(user.Website) > 255 {
|
||||
user.Website = user.Website[:255]
|
||||
func UpdateUser(u *User) error {
|
||||
has, err := x.Where("id != ?", u.Id).And("email = ?", u.Email).Get(new(User))
|
||||
if err != nil {
|
||||
return err
|
||||
} else if has {
|
||||
return ErrEmailAlreadyUsed
|
||||
}
|
||||
|
||||
_, err = orm.Id(user.Id).AllCols().Update(user)
|
||||
u.LowerName = strings.ToLower(u.Name)
|
||||
|
||||
if len(u.Location) > 255 {
|
||||
u.Location = u.Location[:255]
|
||||
}
|
||||
if len(u.Website) > 255 {
|
||||
u.Website = u.Website[:255]
|
||||
}
|
||||
if len(u.Description) > 255 {
|
||||
u.Description = u.Description[:255]
|
||||
}
|
||||
|
||||
if u.AvatarEmail == "" {
|
||||
u.AvatarEmail = u.Email
|
||||
}
|
||||
u.Avatar = avatar.HashEmail(u.AvatarEmail)
|
||||
|
||||
_, err = x.Id(u.Id).AllCols().Update(u)
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteUser completely deletes everything of the user.
|
||||
func DeleteUser(user *User) error {
|
||||
// FIXME: need some kind of mechanism to record failure. HINT: system notice
|
||||
// DeleteUser completely and permanently deletes everything of user.
|
||||
func DeleteUser(u *User) error {
|
||||
// Check ownership of repository.
|
||||
count, err := GetRepositoryCount(user)
|
||||
count, err := GetRepositoryCount(u)
|
||||
if err != nil {
|
||||
return errors.New("modesl.GetRepositories: " + err.Error())
|
||||
return errors.New("GetRepositoryCount: " + err.Error())
|
||||
} else if count > 0 {
|
||||
return ErrUserOwnRepos
|
||||
}
|
||||
|
||||
// TODO: check issues, other repos' commits
|
||||
// Check membership of organization.
|
||||
count, err = u.GetOrganizationCount()
|
||||
if err != nil {
|
||||
return errors.New("GetOrganizationCount: " + err.Error())
|
||||
} else if count > 0 {
|
||||
return ErrUserHasOrgs
|
||||
}
|
||||
|
||||
// FIXME: check issues, other repos' commits
|
||||
// FIXME: roll backable in some point.
|
||||
|
||||
// Delete all followers.
|
||||
if _, err = orm.Delete(&Follow{FollowId: user.Id}); err != nil {
|
||||
if _, err = x.Delete(&Follow{FollowId: u.Id}); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Delete oauth2.
|
||||
if _, err = orm.Delete(&Oauth2{Uid: user.Id}); err != nil {
|
||||
if _, err = x.Delete(&Oauth2{Uid: u.Id}); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Delete all feeds.
|
||||
if _, err = orm.Delete(&Action{UserId: user.Id}); err != nil {
|
||||
if _, err = x.Delete(&Action{UserId: u.Id}); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Delete all watches.
|
||||
if _, err = orm.Delete(&Watch{UserId: user.Id}); err != nil {
|
||||
if _, err = x.Delete(&Watch{UserId: u.Id}); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Delete all accesses.
|
||||
if _, err = orm.Delete(&Access{UserName: user.LowerName}); err != nil {
|
||||
if _, err = x.Delete(&Access{UserName: u.LowerName}); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Delete all SSH keys.
|
||||
keys := make([]PublicKey, 0, 10)
|
||||
if err = orm.Find(&keys, &PublicKey{OwnerId: user.Id}); err != nil {
|
||||
keys := make([]*PublicKey, 0, 10)
|
||||
if err = x.Find(&keys, &PublicKey{OwnerId: u.Id}); err != nil {
|
||||
return err
|
||||
}
|
||||
for _, key := range keys {
|
||||
if err = DeletePublicKey(&key); err != nil {
|
||||
if err = DeletePublicKey(key); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
// Delete user directory.
|
||||
if err = os.RemoveAll(UserPath(user.Name)); err != nil {
|
||||
if err = os.RemoveAll(UserPath(u.Name)); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
_, err = orm.Delete(user)
|
||||
_, err = x.Delete(u)
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteInactivateUsers deletes all inactivate users.
|
||||
func DeleteInactivateUsers() error {
|
||||
_, err := x.Where("is_active=?", false).Delete(new(User))
|
||||
return err
|
||||
}
|
||||
|
||||
// UserPath returns the path absolute path of user repositories.
|
||||
func UserPath(userName string) string {
|
||||
return filepath.Join(base.RepoRootPath, strings.ToLower(userName))
|
||||
return filepath.Join(setting.RepoRootPath, strings.ToLower(userName))
|
||||
}
|
||||
|
||||
func GetUserByKeyId(keyId int64) (*User, error) {
|
||||
user := new(User)
|
||||
rawSql := "SELECT a.* FROM `user` AS a, public_key AS b WHERE a.id = b.owner_id AND b.id=?"
|
||||
has, err := orm.Sql(rawSql, keyId).Get(user)
|
||||
has, err := x.Sql(rawSql, keyId).Get(user)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
} else if !has {
|
||||
err = errors.New("not exist key owner")
|
||||
return nil, err
|
||||
return nil, ErrUserNotKeyOwner
|
||||
}
|
||||
return user, nil
|
||||
}
|
||||
|
||||
// GetUserById returns the user object by given id if exists.
|
||||
// GetUserById returns the user object by given ID if exists.
|
||||
func GetUserById(id int64) (*User, error) {
|
||||
user := new(User)
|
||||
has, err := orm.Id(id).Get(user)
|
||||
u := new(User)
|
||||
has, err := x.Id(id).Get(u)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !has {
|
||||
} else if !has {
|
||||
return nil, ErrUserNotExist
|
||||
}
|
||||
return user, nil
|
||||
return u, nil
|
||||
}
|
||||
|
||||
// GetUserByName returns the user object by given name if exists.
|
||||
// GetUserByName returns user by given name.
|
||||
func GetUserByName(name string) (*User, error) {
|
||||
if len(name) == 0 {
|
||||
return nil, ErrUserNotExist
|
||||
}
|
||||
user := &User{LowerName: strings.ToLower(name)}
|
||||
has, err := orm.Get(user)
|
||||
u := &User{LowerName: strings.ToLower(name)}
|
||||
has, err := x.Get(u)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
} else if !has {
|
||||
return nil, ErrUserNotExist
|
||||
}
|
||||
return user, nil
|
||||
return u, nil
|
||||
}
|
||||
|
||||
// GetUserEmailsByNames returns a slice of e-mails corresponds to names.
|
||||
// GetUserEmailsByNames returns a list of e-mails corresponds to names.
|
||||
func GetUserEmailsByNames(names []string) []string {
|
||||
mails := make([]string, 0, len(names))
|
||||
for _, name := range names {
|
||||
@@ -394,13 +571,66 @@ func GetUserEmailsByNames(names []string) []string {
|
||||
return mails
|
||||
}
|
||||
|
||||
// GetUserIdsByNames returns a slice of ids corresponds to names.
|
||||
func GetUserIdsByNames(names []string) []int64 {
|
||||
ids := make([]int64, 0, len(names))
|
||||
for _, name := range names {
|
||||
u, err := GetUserByName(name)
|
||||
if err != nil {
|
||||
continue
|
||||
}
|
||||
ids = append(ids, u.Id)
|
||||
}
|
||||
return ids
|
||||
}
|
||||
|
||||
// UserCommit represents a commit with validation of user.
|
||||
type UserCommit struct {
|
||||
User *User
|
||||
*git.Commit
|
||||
}
|
||||
|
||||
// ValidateCommitWithEmail chceck if author's e-mail of commit is corresponsind to a user.
|
||||
func ValidateCommitWithEmail(c *git.Commit) *User {
|
||||
u, err := GetUserByEmail(c.Author.Email)
|
||||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
return u
|
||||
}
|
||||
|
||||
// ValidateCommitsWithEmails checks if authors' e-mails of commits are corresponding to users.
|
||||
func ValidateCommitsWithEmails(oldCommits *list.List) *list.List {
|
||||
emails := map[string]*User{}
|
||||
newCommits := list.New()
|
||||
e := oldCommits.Front()
|
||||
for e != nil {
|
||||
c := e.Value.(*git.Commit)
|
||||
|
||||
var u *User
|
||||
if v, ok := emails[c.Author.Email]; !ok {
|
||||
u, _ = GetUserByEmail(c.Author.Email)
|
||||
emails[c.Author.Email] = u
|
||||
} else {
|
||||
u = v
|
||||
}
|
||||
|
||||
newCommits.PushBack(UserCommit{
|
||||
User: u,
|
||||
Commit: c,
|
||||
})
|
||||
e = e.Next()
|
||||
}
|
||||
return newCommits
|
||||
}
|
||||
|
||||
// GetUserByEmail returns the user object by given e-mail if exists.
|
||||
func GetUserByEmail(email string) (*User, error) {
|
||||
if len(email) == 0 {
|
||||
return nil, ErrUserNotExist
|
||||
}
|
||||
user := &User{Email: strings.ToLower(email)}
|
||||
has, err := orm.Get(user)
|
||||
has, err := x.Get(user)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
} else if !has {
|
||||
@@ -409,31 +639,19 @@ func GetUserByEmail(email string) (*User, error) {
|
||||
return user, nil
|
||||
}
|
||||
|
||||
// LoginUserPlain validates user by raw user name and password.
|
||||
func LoginUserPlain(uname, passwd string) (*User, error) {
|
||||
var u *User
|
||||
if strings.Contains(uname, "@") {
|
||||
u = &User{Email: uname}
|
||||
} else {
|
||||
u = &User{LowerName: strings.ToLower(uname)}
|
||||
// SearchUserByName returns given number of users whose name contains keyword.
|
||||
func SearchUserByName(opt SearchOption) (us []*User, err error) {
|
||||
if len(opt.Keyword) == 0 {
|
||||
return us, nil
|
||||
}
|
||||
opt.Keyword = strings.ToLower(opt.Keyword)
|
||||
|
||||
has, err := orm.Get(u)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
} else if !has {
|
||||
return nil, ErrUserNotExist
|
||||
}
|
||||
|
||||
newUser := &User{Passwd: passwd, Salt: u.Salt}
|
||||
newUser.EncodePasswd()
|
||||
if u.Passwd != newUser.Passwd {
|
||||
return nil, ErrUserNotExist
|
||||
}
|
||||
return u, nil
|
||||
us = make([]*User, 0, opt.Limit)
|
||||
err = x.Limit(opt.Limit).Where("type=0").And("lower_name like ?", "%"+opt.Keyword+"%").Find(&us)
|
||||
return us, err
|
||||
}
|
||||
|
||||
// Follow is connection request for receiving user notifycation.
|
||||
// Follow is connection request for receiving user notification.
|
||||
type Follow struct {
|
||||
Id int64
|
||||
UserId int64 `xorm:"unique(follow)"`
|
||||
@@ -442,32 +660,32 @@ type Follow struct {
|
||||
|
||||
// FollowUser marks someone be another's follower.
|
||||
func FollowUser(userId int64, followId int64) (err error) {
|
||||
session := orm.NewSession()
|
||||
defer session.Close()
|
||||
session.Begin()
|
||||
sess := x.NewSession()
|
||||
defer sess.Close()
|
||||
sess.Begin()
|
||||
|
||||
if _, err = session.Insert(&Follow{UserId: userId, FollowId: followId}); err != nil {
|
||||
session.Rollback()
|
||||
if _, err = sess.Insert(&Follow{UserId: userId, FollowId: followId}); err != nil {
|
||||
sess.Rollback()
|
||||
return err
|
||||
}
|
||||
|
||||
rawSql := "UPDATE `user` SET num_followers = num_followers + 1 WHERE id = ?"
|
||||
if _, err = session.Exec(rawSql, followId); err != nil {
|
||||
session.Rollback()
|
||||
if _, err = sess.Exec(rawSql, followId); err != nil {
|
||||
sess.Rollback()
|
||||
return err
|
||||
}
|
||||
|
||||
rawSql = "UPDATE `user` SET num_followings = num_followings + 1 WHERE id = ?"
|
||||
if _, err = session.Exec(rawSql, userId); err != nil {
|
||||
session.Rollback()
|
||||
if _, err = sess.Exec(rawSql, userId); err != nil {
|
||||
sess.Rollback()
|
||||
return err
|
||||
}
|
||||
return session.Commit()
|
||||
return sess.Commit()
|
||||
}
|
||||
|
||||
// UnFollowUser unmarks someone be another's follower.
|
||||
func UnFollowUser(userId int64, unFollowId int64) (err error) {
|
||||
session := orm.NewSession()
|
||||
session := x.NewSession()
|
||||
defer session.Close()
|
||||
session.Begin()
|
||||
|
||||
@@ -489,3 +707,45 @@ func UnFollowUser(userId int64, unFollowId int64) (err error) {
|
||||
}
|
||||
return session.Commit()
|
||||
}
|
||||
|
||||
func UpdateMentions(userNames []string, issueId int64) error {
|
||||
users := make([]*User, 0, len(userNames))
|
||||
|
||||
if err := x.Where("name IN (?)", strings.Join(userNames, "\",\"")).OrderBy("name ASC").Find(&users); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
ids := make([]int64, 0, len(userNames))
|
||||
|
||||
for _, user := range users {
|
||||
ids = append(ids, user.Id)
|
||||
|
||||
if user.Type == INDIVIDUAL {
|
||||
continue
|
||||
}
|
||||
|
||||
if user.NumMembers == 0 {
|
||||
continue
|
||||
}
|
||||
|
||||
tempIds := make([]int64, 0, user.NumMembers)
|
||||
|
||||
orgUsers, err := GetOrgUsersByOrgId(user.Id)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, orgUser := range orgUsers {
|
||||
tempIds = append(tempIds, orgUser.Id)
|
||||
}
|
||||
|
||||
ids = append(ids, tempIds...)
|
||||
}
|
||||
|
||||
if err := UpdateIssueUserPairsByMentions(ids, issueId); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
371
models/webhook.go
Normal file
371
models/webhook.go
Normal file
@@ -0,0 +1,371 @@
|
||||
// Copyright 2014 The Gogs Authors. All rights reserved.
|
||||
// Use of this source code is governed by a MIT-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package models
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"io/ioutil"
|
||||
"time"
|
||||
|
||||
"github.com/gogits/gogs/modules/httplib"
|
||||
"github.com/gogits/gogs/modules/log"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
"github.com/gogits/gogs/modules/uuid"
|
||||
)
|
||||
|
||||
var (
|
||||
ErrWebhookNotExist = errors.New("Webhook does not exist")
|
||||
)
|
||||
|
||||
type HookContentType int
|
||||
|
||||
const (
|
||||
JSON HookContentType = iota + 1
|
||||
FORM
|
||||
)
|
||||
|
||||
var hookContentTypes = map[string]HookContentType{
|
||||
"json": JSON,
|
||||
"form": FORM,
|
||||
}
|
||||
|
||||
// ToHookContentType returns HookContentType by given name.
|
||||
func ToHookContentType(name string) HookContentType {
|
||||
return hookContentTypes[name]
|
||||
}
|
||||
|
||||
func (t HookContentType) Name() string {
|
||||
switch t {
|
||||
case JSON:
|
||||
return "json"
|
||||
case FORM:
|
||||
return "form"
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// IsValidHookContentType returns true if given name is a valid hook content type.
|
||||
func IsValidHookContentType(name string) bool {
|
||||
_, ok := hookContentTypes[name]
|
||||
return ok
|
||||
}
|
||||
|
||||
// HookEvent represents events that will delivery hook.
|
||||
type HookEvent struct {
|
||||
PushOnly bool `json:"push_only"`
|
||||
}
|
||||
|
||||
// Webhook represents a web hook object.
|
||||
type Webhook struct {
|
||||
Id int64
|
||||
RepoId int64
|
||||
Url string `xorm:"TEXT"`
|
||||
ContentType HookContentType
|
||||
Secret string `xorm:"TEXT"`
|
||||
Events string `xorm:"TEXT"`
|
||||
*HookEvent `xorm:"-"`
|
||||
IsSsl bool
|
||||
IsActive bool
|
||||
HookTaskType HookTaskType
|
||||
Meta string `xorm:"TEXT"` // store hook-specific attributes
|
||||
OrgId int64
|
||||
Created time.Time `xorm:"CREATED"`
|
||||
Updated time.Time `xorm:"UPDATED"`
|
||||
}
|
||||
|
||||
// GetEvent handles conversion from Events to HookEvent.
|
||||
func (w *Webhook) GetEvent() {
|
||||
w.HookEvent = &HookEvent{}
|
||||
if err := json.Unmarshal([]byte(w.Events), w.HookEvent); err != nil {
|
||||
log.Error(4, "webhook.GetEvent(%d): %v", w.Id, err)
|
||||
}
|
||||
}
|
||||
|
||||
func (w *Webhook) GetSlackHook() *Slack {
|
||||
s := &Slack{}
|
||||
if err := json.Unmarshal([]byte(w.Meta), s); err != nil {
|
||||
log.Error(4, "webhook.GetSlackHook(%d): %v", w.Id, err)
|
||||
}
|
||||
return s
|
||||
}
|
||||
|
||||
// UpdateEvent handles conversion from HookEvent to Events.
|
||||
func (w *Webhook) UpdateEvent() error {
|
||||
data, err := json.Marshal(w.HookEvent)
|
||||
w.Events = string(data)
|
||||
return err
|
||||
}
|
||||
|
||||
// HasPushEvent returns true if hook enabled push event.
|
||||
func (w *Webhook) HasPushEvent() bool {
|
||||
if w.PushOnly {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// CreateWebhook creates a new web hook.
|
||||
func CreateWebhook(w *Webhook) error {
|
||||
_, err := x.Insert(w)
|
||||
return err
|
||||
}
|
||||
|
||||
// GetWebhookById returns webhook by given ID.
|
||||
func GetWebhookById(hookId int64) (*Webhook, error) {
|
||||
w := &Webhook{Id: hookId}
|
||||
has, err := x.Get(w)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
} else if !has {
|
||||
return nil, ErrWebhookNotExist
|
||||
}
|
||||
return w, nil
|
||||
}
|
||||
|
||||
// GetActiveWebhooksByRepoId returns all active webhooks of repository.
|
||||
func GetActiveWebhooksByRepoId(repoId int64) (ws []*Webhook, err error) {
|
||||
err = x.Where("repo_id=?", repoId).And("is_active=?", true).Find(&ws)
|
||||
return ws, err
|
||||
}
|
||||
|
||||
// GetWebhooksByRepoId returns all webhooks of repository.
|
||||
func GetWebhooksByRepoId(repoId int64) (ws []*Webhook, err error) {
|
||||
err = x.Find(&ws, &Webhook{RepoId: repoId})
|
||||
return ws, err
|
||||
}
|
||||
|
||||
// UpdateWebhook updates information of webhook.
|
||||
func UpdateWebhook(w *Webhook) error {
|
||||
_, err := x.Id(w.Id).AllCols().Update(w)
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteWebhook deletes webhook of repository.
|
||||
func DeleteWebhook(hookId int64) error {
|
||||
_, err := x.Delete(&Webhook{Id: hookId})
|
||||
return err
|
||||
}
|
||||
|
||||
// GetWebhooksByOrgId returns all webhooks for an organization.
|
||||
func GetWebhooksByOrgId(orgId int64) (ws []*Webhook, err error) {
|
||||
err = x.Find(&ws, &Webhook{OrgId: orgId})
|
||||
return ws, err
|
||||
}
|
||||
|
||||
// GetActiveWebhooksByOrgId returns all active webhooks for an organization.
|
||||
func GetActiveWebhooksByOrgId(orgId int64) (ws []*Webhook, err error) {
|
||||
err = x.Where("org_id=?", orgId).And("is_active=?", true).Find(&ws)
|
||||
return ws, err
|
||||
}
|
||||
|
||||
// ___ ___ __ ___________ __
|
||||
// / | \ ____ ____ | | _\__ ___/____ _____| | __
|
||||
// / ~ \/ _ \ / _ \| |/ / | | \__ \ / ___/ |/ /
|
||||
// \ Y ( <_> | <_> ) < | | / __ \_\___ \| <
|
||||
// \___|_ / \____/ \____/|__|_ \ |____| (____ /____ >__|_ \
|
||||
// \/ \/ \/ \/ \/
|
||||
|
||||
type HookTaskType int
|
||||
|
||||
const (
|
||||
GOGS HookTaskType = iota + 1
|
||||
SLACK
|
||||
)
|
||||
|
||||
var hookTaskTypes = map[string]HookTaskType{
|
||||
"gogs": GOGS,
|
||||
"slack": SLACK,
|
||||
}
|
||||
|
||||
// ToHookTaskType returns HookTaskType by given name.
|
||||
func ToHookTaskType(name string) HookTaskType {
|
||||
return hookTaskTypes[name]
|
||||
}
|
||||
|
||||
func (t HookTaskType) Name() string {
|
||||
switch t {
|
||||
case GOGS:
|
||||
return "gogs"
|
||||
case SLACK:
|
||||
return "slack"
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// IsValidHookTaskType returns true if given name is a valid hook task type.
|
||||
func IsValidHookTaskType(name string) bool {
|
||||
_, ok := hookTaskTypes[name]
|
||||
return ok
|
||||
}
|
||||
|
||||
type HookEventType string
|
||||
|
||||
const (
|
||||
PUSH HookEventType = "push"
|
||||
)
|
||||
|
||||
// FIXME: just use go-gogs-client structs maybe?
|
||||
type PayloadAuthor struct {
|
||||
Name string `json:"name"`
|
||||
Email string `json:"email"`
|
||||
UserName string `json:"username"`
|
||||
}
|
||||
|
||||
type PayloadCommit struct {
|
||||
Id string `json:"id"`
|
||||
Message string `json:"message"`
|
||||
Url string `json:"url"`
|
||||
Author *PayloadAuthor `json:"author"`
|
||||
}
|
||||
|
||||
type PayloadRepo struct {
|
||||
Id int64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Url string `json:"url"`
|
||||
Description string `json:"description"`
|
||||
Website string `json:"website"`
|
||||
Watchers int `json:"watchers"`
|
||||
Owner *PayloadAuthor `json:"owner"`
|
||||
Private bool `json:"private"`
|
||||
}
|
||||
|
||||
type BasePayload interface {
|
||||
GetJSONPayload() ([]byte, error)
|
||||
}
|
||||
|
||||
// Payload represents a payload information of hook.
|
||||
type Payload struct {
|
||||
Secret string `json:"secret"`
|
||||
Ref string `json:"ref"`
|
||||
Commits []*PayloadCommit `json:"commits"`
|
||||
Repo *PayloadRepo `json:"repository"`
|
||||
Pusher *PayloadAuthor `json:"pusher"`
|
||||
Before string `json:"before"`
|
||||
After string `json:"after"`
|
||||
CompareUrl string `json:"compare_url"`
|
||||
}
|
||||
|
||||
func (p Payload) GetJSONPayload() ([]byte, error) {
|
||||
data, err := json.Marshal(p)
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
return data, nil
|
||||
}
|
||||
|
||||
// HookTask represents a hook task.
|
||||
type HookTask struct {
|
||||
Id int64
|
||||
Uuid string
|
||||
Type HookTaskType
|
||||
Url string
|
||||
BasePayload `xorm:"-"`
|
||||
PayloadContent string `xorm:"TEXT"`
|
||||
ContentType HookContentType
|
||||
EventType HookEventType
|
||||
IsSsl bool
|
||||
IsDelivered bool
|
||||
IsSucceed bool
|
||||
}
|
||||
|
||||
// CreateHookTask creates a new hook task,
|
||||
// it handles conversion from Payload to PayloadContent.
|
||||
func CreateHookTask(t *HookTask) error {
|
||||
data, err := t.BasePayload.GetJSONPayload()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
t.Uuid = uuid.NewV4().String()
|
||||
t.PayloadContent = string(data)
|
||||
_, err = x.Insert(t)
|
||||
return err
|
||||
}
|
||||
|
||||
// UpdateHookTask updates information of hook task.
|
||||
func UpdateHookTask(t *HookTask) error {
|
||||
_, err := x.Id(t.Id).AllCols().Update(t)
|
||||
return err
|
||||
}
|
||||
|
||||
var (
|
||||
// Prevent duplicate deliveries.
|
||||
// This happens with massive hook tasks cannot finish delivering
|
||||
// before next shooting starts.
|
||||
isShooting = false
|
||||
)
|
||||
|
||||
// DeliverHooks checks and delivers undelivered hooks.
|
||||
// FIXME: maybe can use goroutine to shoot a number of them at same time?
|
||||
func DeliverHooks() {
|
||||
if isShooting {
|
||||
return
|
||||
}
|
||||
isShooting = true
|
||||
defer func() { isShooting = false }()
|
||||
|
||||
tasks := make([]*HookTask, 0, 10)
|
||||
timeout := time.Duration(setting.WebhookDeliverTimeout) * time.Second
|
||||
x.Where("is_delivered=?", false).Iterate(new(HookTask),
|
||||
func(idx int, bean interface{}) error {
|
||||
t := bean.(*HookTask)
|
||||
req := httplib.Post(t.Url).SetTimeout(timeout, timeout).
|
||||
Header("X-Gogs-Delivery", t.Uuid).
|
||||
Header("X-Gogs-Event", string(t.EventType))
|
||||
|
||||
switch t.ContentType {
|
||||
case JSON:
|
||||
req = req.Header("Content-Type", "application/json").Body(t.PayloadContent)
|
||||
case FORM:
|
||||
req.Param("payload", t.PayloadContent)
|
||||
}
|
||||
|
||||
t.IsDelivered = true
|
||||
|
||||
// FIXME: record response.
|
||||
switch t.Type {
|
||||
case GOGS:
|
||||
{
|
||||
if _, err := req.Response(); err != nil {
|
||||
log.Error(4, "Delivery: %v", err)
|
||||
} else {
|
||||
t.IsSucceed = true
|
||||
}
|
||||
}
|
||||
case SLACK:
|
||||
{
|
||||
if res, err := req.Response(); err != nil {
|
||||
log.Error(4, "Delivery: %v", err)
|
||||
} else {
|
||||
defer res.Body.Close()
|
||||
contents, err := ioutil.ReadAll(res.Body)
|
||||
if err != nil {
|
||||
log.Error(4, "%s", err)
|
||||
} else {
|
||||
if string(contents) != "ok" {
|
||||
log.Error(4, "slack failed with: %s", string(contents))
|
||||
} else {
|
||||
t.IsSucceed = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tasks = append(tasks, t)
|
||||
|
||||
if t.IsSucceed {
|
||||
log.Trace("Hook delivered(%s): %s", t.Uuid, t.PayloadContent)
|
||||
}
|
||||
return nil
|
||||
})
|
||||
|
||||
// Update hook task status.
|
||||
for _, t := range tasks {
|
||||
if err := UpdateHookTask(t); err != nil {
|
||||
log.Error(4, "UpdateHookTask(%d): %v", t.Id, err)
|
||||
}
|
||||
}
|
||||
}
|
||||
27
modules/asn1-ber/LICENSE
Normal file
27
modules/asn1-ber/LICENSE
Normal file
@@ -0,0 +1,27 @@
|
||||
Copyright (c) 2012 The Go Authors. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the following disclaimer
|
||||
in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* Neither the name of Google Inc. nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user