Proxy settings from configuration file is not passed to push mirror operations #14099

Closed
opened 2025-11-02 11:02:48 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @melonedo on GitHub (Feb 5, 2025).

Description

In mirror_pull.go, the proxy settings are retrieved and passed to git operations
7e596bd7a9/services/mirror/mirror_pull.go (L249-L259)

However, in mirror_push.go, the environment is not passed to the underlying interface although it is supported
7e596bd7a9/services/mirror/mirror_push.go (L164-L169)

This prevents push mirrors from using proxies.

Gitea Version

Gitea version 1.22.4 built with GNU Make 4.3, go1.22.9 : bindata, sqlite, sqlite_unlock_notify

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

Configure proxy.PROXY_ENABLED/PROXY_URL/PROXY_HOSTS and use push mirrors

Database

None

Originally created by @melonedo on GitHub (Feb 5, 2025). ### Description In mirror_pull.go, the proxy settings are retrieved and passed to git operations https://github.com/go-gitea/gitea/blob/7e596bd7a9378cadbbd9efaf9cc622de554e056c/services/mirror/mirror_pull.go#L249-L259 However, in mirror_push.go, the environment is not passed to the underlying interface although it is supported https://github.com/go-gitea/gitea/blob/7e596bd7a9378cadbbd9efaf9cc622de554e056c/services/mirror/mirror_push.go#L164-L169 This prevents push mirrors from using proxies. ### Gitea Version Gitea version 1.22.4 built with GNU Make 4.3, go1.22.9 : bindata, sqlite, sqlite_unlock_notify ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version _No response_ ### Operating System _No response_ ### How are you running Gitea? Configure proxy.PROXY_ENABLED/PROXY_URL/PROXY_HOSTS and use push mirrors ### Database None
GiteaMirror added the type/bug label 2025-11-02 11:02:48 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#14099