我刚创建了一个Gitlab账户。我从我的机器上写下了以下命令:
cd /var/www/projet
git init
git add .
git commit -m "Initial commit"
git remote add origin https://gitlab.com/Alain83/touslesport.git
git push -u origin master每件事都做得很好,对最后一件事我很反感,我得到的是:
致命:无法访问'https://User:password@gitlab.com/Alain83/touslesport.git/':无法连接到本地主机端口3128:连接被拒绝
然而,如果我在浏览器中以url的形式编写https://User:password@gitlab.com/Alain83/touslesport.git,我就可以连接到Gitlab中的projet。
有人能帮我解决这个问题吗?
发布于 2019-12-24 13:21:09
为了能够启动git命令,我正在使用Windows和cmder。前两个命令的结果是:
λ git config http.proxy
http://localhost:3128
λ git config https.proxy
http://localhost:3128
λ echo %http_proxy%
http://localhost:3128
λ echo %https_proxy%
http://localhost:3128我无法用我的环境运行最后三个。我也认为我的代理有问题。我在用我公司的一台电脑。为了避免代理出现问题,我使用cntlm。如何设置cntlm以便将文件从计算机传输到gitlab,反之亦然?
https://stackoverflow.com/questions/59447533
复制相似问题