aboutsummaryrefslogtreecommitdiffstats
path: root/modules/repository
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2021-08-18 21:10:39 +0800
committerGitHub <noreply@github.com>2021-08-18 21:10:39 +0800
commitf9acad82ca231b2a094879e53134b0d91815ddf0 (patch)
tree31207c11f9d2c7135bfb31cbf1388d94724f1ddc /modules/repository
parent422c30d3157d9f06af43901a1c7978dd25ca12a5 (diff)
downloadgitea-f9acad82ca231b2a094879e53134b0d91815ddf0.tar.gz
gitea-f9acad82ca231b2a094879e53134b0d91815ddf0.zip
Add proxy settings and support for migration and webhook (#16704)
* Add proxy settings and support for migration and webhook * Fix default value * Add newline for example ini * Add lfs proxy support * Fix lint * Follow @zeripath's review * Fix git clone * Fix test * missgin http requests for proxy * use empty Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
Diffstat (limited to 'modules/repository')
-rw-r--r--modules/repository/repo.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/repository/repo.go b/modules/repository/repo.go
index 08531c04ed..6b87039775 100644
--- a/modules/repository/repo.go
+++ b/modules/repository/repo.go
@@ -126,7 +126,7 @@ func MigrateRepositoryGitData(ctx context.Context, u *models.User, repo *models.
if opts.LFS {
ep := lfs.DetermineEndpoint(opts.CloneAddr, opts.LFSEndpoint)
- if err = StoreMissingLfsObjectsInRepository(ctx, repo, gitRepo, ep); err != nil {
+ if err = StoreMissingLfsObjectsInRepository(ctx, repo, gitRepo, ep, setting.Migrations.SkipTLSVerify); err != nil {
log.Error("Failed to store missing LFS objects for repository: %v", err)
}
}
@@ -316,8 +316,8 @@ func PushUpdateAddTag(repo *models.Repository, gitRepo *git.Repository, tagName
}
// StoreMissingLfsObjectsInRepository downloads missing LFS objects
-func StoreMissingLfsObjectsInRepository(ctx context.Context, repo *models.Repository, gitRepo *git.Repository, endpoint *url.URL) error {
- client := lfs.NewClient(endpoint)
+func StoreMissingLfsObjectsInRepository(ctx context.Context, repo *models.Repository, gitRepo *git.Repository, endpoint *url.URL, skipTLSVerify bool) error {
+ client := lfs.NewClient(endpoint, skipTLSVerify)
contentStore := lfs.NewContentStore()
pointerChan := make(chan lfs.PointerBlob)