Commit Graph

91 Commits

Author SHA1 Message Date
04fdeb9d8d Make Xorm log configurable (#174)
* make xorm log configable

* bug fixed for other sub commands except web

* rebase and fix xorm log

* bug fix for TrimSpace
2017-02-20 16:11:13 +08:00
be55460b63 catch error on call setup on serv command (#932) 2017-02-15 09:25:21 +08:00
bf6f61cc69 Cleanup log messaging
This change corrects a few logging issues:

 * Standardized formatting errors with '%v'.
 * Standardized failure warning word usage.
 * Corrected an instance of using the standard log library when
   the gitea log library should be used instead.
2017-02-02 15:24:18 +01:00
2e7ccecfe6 Git LFS support v2 (#122)
* Import github.com/git-lfs/lfs-test-server as lfs module base

Imported commit is 3968aac269a77b73924649b9412ae03f7ccd3198

Removed:

Dockerfile CONTRIBUTING.md mgmt* script/ vendor/ kvlogger.go
.dockerignore .gitignore README.md

* Remove config, add JWT support from github.com/mgit-at/lfs-test-server

Imported commit f0cdcc5a01599c5a955dc1bbf683bb4acecdba83

* Add LFS settings

* Add LFS meta object model

* Add LFS routes and initialization

* Import github.com/dgrijalva/jwt-go into vendor/

* Adapt LFS module: handlers, routing, meta store

* Move LFS routes to /user/repo/info/lfs/*

* Add request header checks to LFS BatchHandler / PostHandler

* Implement LFS basic authentication

* Rework JWT secret generation / load

* Implement LFS SSH token authentication with JWT

Specification: https://github.com/github/git-lfs/tree/master/docs/api

* Integrate LFS settings into install process

* Remove LFS objects when repository is deleted

Only removes objects from content store when deleted repo is the only
referencing repository

* Make LFS module stateless

Fixes bug where LFS would not work after installation without
restarting Gitea

* Change 500 'Internal Server Error' to 400 'Bad Request'

* Change sql query to xorm call

* Remove unneeded type from LFS module

* Change internal imports to code.gitea.io/gitea/

* Add Gitea authors copyright

* Change basic auth realm to "gitea-lfs"

* Add unique indexes to LFS model

* Use xorm count function in LFS check on repository delete

* Return io.ReadCloser from content store and close after usage

* Add LFS info to runWeb()

* Export LFS content store base path

* LFS file download from UI

* Work around git-lfs client issue with unauthenticated requests

Returning a dummy Authorization header for unauthenticated requests
lets git-lfs client skip asking for auth credentials
See: https://github.com/github/git-lfs/issues/1088

* Fix unauthenticated UI downloads from public repositories

* Authentication check order, Finish LFS file view logic

* Ignore LFS hooks if installed for current OS user

Fixes Gitea UI actions for repositories tracking LFS files.
Checks for minimum needed git version by parsing the semantic version
string.

* Hide LFS metafile diff from commit view, marking as binary

* Show LFS notice if file in commit view is tracked

* Add notbefore/nbf JWT claim

* Correct lint suggestions - comments for structs and functions

- Add comments to LFS model
- Function comment for GetRandomBytesAsBase64
- LFS server function comments and lint variable suggestion

* Move secret generation code out of conditional

Ensures no LFS code may run with an empty secret

* Do not hand out JWT tokens if LFS server support is disabled
2016-12-26 09:16:37 +08:00
47a7529d96 update code.gitea.io/git (#450) 2016-12-22 10:30:52 +01:00
ce21ed6c34 Remove remaining Gogs reference on locales and cmd (#430) 2016-12-21 20:13:17 +08:00
026ad4aee7 Fixes panic when there's no user initialized (#358) 2016-12-06 21:58:34 +01:00
947d2ee21b Fixes #316
Export Pusher name as GITEA_PUSHER_NAME env variable
Export also GITEA_UUID, but keep the uuid env variable for backward compatibility

export pusher name ENV variable #316

change env variable prefix to GITEA_

Signed-off-by: Antonio Facciolo <afdev82@gmail.com>

Export also GITEA_UUID #316

Keep uuid env variable for backward compatibility
2016-12-05 12:25:45 +01:00
4ff0db0246 Catch os... errors 2016-12-02 07:41:19 +01:00
5054020c1f fix gofmt error.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-11-15 00:03:37 +08:00
4247304f5a Update import paths from github.com/go-gitea to code.gitea.io (#135)
- Update import paths from github.com/go-gitea to code.gitea.io
- Fix import path for travis

See https://docs.travis-ci.com/user/languages/go#Go-Import-Path
2016-11-10 17:24:48 +01:00
5cd093aa46 Use cli Flags directly and not some helper funcs
Signed-off-by: Matthias Loibl <mail@matthiasloibl.com>
2016-11-09 23:18:22 +01:00
aadd7dcdc3 And others 2016-11-07 17:53:22 +01:00
f388661bda ACCESS_MODE_* -> AccessMode* 2016-11-07 17:20:37 +01:00
6e4252dad4 Replace gogits/git-module dependency with go-gitea/git (#94)
* Replace gogits/git-module dependency with go-gitea/git

Fixes #92

* Remove git alias for git module import (not needed)
2016-11-06 11:18:34 -02:00
5b5af7daee Made linter happy in cmd folder 2016-11-04 23:45:06 +01:00
2d68bd1ef9 Change import reference to match gitea instead of gogs (#37) 2016-11-03 10:29:56 -02:00
4f40019130 codegangsta/cli => urfave/cli (#3546) 2016-08-30 04:57:58 -07:00
a00c932bbc General code quality improvement 2016-08-16 23:06:38 -07:00
dccb0c15b9 Replace convert.To with APIFormat calls 2016-08-14 04:17:26 -07:00
3f7f4852ef #2246 fully support of webhooks for pull request 2016-08-14 03:32:24 -07:00
1f2e173a74 Refactor User.Id to User.ID 2016-07-24 01:08:22 +08:00
7826eae452 #3045 fix DEPRECATED Action signature erorr 2016-05-12 14:32:28 -04:00
8055a0bdac Post work for #2637
Improve test cases, config settings, also show SSH config settings on admin config panel.
2016-02-27 20:48:39 -05:00
c9516c4c60 Fix wrong place to check disable SSH 2016-02-21 21:55:59 -05:00
ac78bae7b5 Replace uuid module with original package 2016-02-20 18:13:12 -05:00
338af89d56 #2650 fix possbility that use email as pusher user name
Remove the possibility of using email as user name when user actually push
through combination of email and password with HTTP.

Also refactor update action function to replcae tons of arguments with
single PushUpdateOptions struct.
And define the user who pushes code as pusher, therefore variable names shouldn't
be confusing any more.
2016-02-17 22:47:06 -05:00
a62290de52 #2311 improve HTTP auth error message 2015-12-30 21:29:30 -05:00
85af36332b #2282 fix utf-8 recognized as windows-1252 2015-12-25 05:25:47 -05:00
9cd16c5b12 #1692 add organization APIs 2015-12-17 02:28:47 -05:00
3362b3a44f fix possible disclosure 2015-12-14 17:06:54 -05:00
e4a092fb5a Make serv/update use LOCAL_ROOT_URL instead public
The reasoning for that is in the previous commit.
2015-12-09 23:11:07 +01:00
dcb391d341 Merge branch 'feature/wiki' into develop 2015-11-30 20:46:19 -05:00
830d000667 finish wiki 2015-11-30 20:45:55 -05:00
9950f5a5bd add line break after SSH error message 2015-11-30 10:00:52 -05:00
21ad4bf0fe print error log to client side when dev mode 2015-11-23 22:33:24 -05:00
0128036514 #1681 some fixes for builtin SSH server on Windows 2015-11-23 22:32:07 -05:00
e030109b5a fix api broken 2015-11-15 17:07:44 -05:00
2db785b3ed convert missing name 2015-11-09 11:39:03 -05:00
647688bd06 #1266 convert name to lower when handle SSH 2015-11-09 11:34:04 -05:00
18c841050b fix 1540 and experimental SSH server support 2015-11-08 16:59:56 -05:00
b55499d039 go vet and fix #1890 2015-11-08 14:31:49 -05:00
f255b1e86d #1896 fatal when no needed update task 2015-11-04 21:57:10 -05:00
b9f5def5dc fix insecure tls when trigger task 2015-10-26 09:16:24 -04:00
0fbb8c8826 New push to head repo of head branch: regenerate patch and retest apply 2015-10-24 03:36:47 -04:00
db00aa7653 add log for trigger hook when push through SSH 2015-10-05 09:46:00 -04:00
e75fd2f783 simplify names 2015-09-16 23:08:46 -04:00
dea3a8c6a4 WIP: create PR - choose branch 2015-08-08 22:43:14 +08:00
39a3b768bc #334: Add Deployment Key Support 2015-08-06 22:48:11 +08:00
e50982f5ec allow anonymous SSH clone 2015-08-05 11:14:17 +08:00