无法通过代理网址推送到gitlab

我正在通过代理使用gitlab,并且无法从本地存储库推送到远程存储库。我正在使用以下命令:

git remote add origin https://proxy-url/user/repo.git
git add .'''
git commit -m "Initial commit" 
git push -u origin master

在使用push命令时,我收到以下错误消息:

fatal: unable to access 'https://proxy-url/user/repo.git/': Received HTTP code 403 from proxy after CONNECT

对此事的任何帮助将不胜感激!

z86631075 回答:无法通过代理网址推送到gitlab

代理URL本身不应该是GitLab URL的一部分。

您只需设置/导出HTTP_PROXYHTTPS_PROXY到该URL,该URL将在推送期间由Git拾取。
您也可以在git config http.proxy设置中设置代理。

在两种情况下,该代理URL通常应该是HTTP,而不是HTTPS:

export HTTP_proxy=http://proxy/url
export HTTPS_proxy=http://proxy/url
                     ^^^
                   still http,not https
本文链接:https://www.f2er.com/2686655.html

大家都在问