proxy,https,git,tortoise git,ssh-agent,ssh-add,ssh,ssl,rsync

本文介绍了如何在受限网络环境中配置GitLab,并通过代理访问GitLab仓库。包括使用http代理进行git操作的方法、修改GitLab相关配置以适应特定网络环境的过程,以及如何设置系统代理变量等。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

看具体应用了,一般的文件复制使用scp,增量同步使用rsync。
rsync的认证可以使用ssh,还可以是rsync自己的密码文件。
 
ssh-keygen -l 察看 fineprint

 

 
5.1 通过proxy访问gitlab

在公司内, 从github取代码时只能使用http链接方式,git(ssh)和https都不行,所以在取gitlabhq本身,以及取下来后用bundler安装子模块时,都需要修改(在 bundle install --without development test --deployment 这一步之前, 需要先修改 /opt/gitlabhq/Gemfile ,将所有https换成http。如果不小心先跑了这 一步,则需要再修改 Gemfile.lock )。

另外,git不使用环境变量http_proxy的值,而是需要单独设置:

git config --global http.proxy http://username:password@proxy.foobar.com:8080
git clone https://github.com/gitlabhq/gitlabhq.git

一些准备工作

0.1 proxy设置
export http_proxy=http://username:password@proxy.mycompany.com:8080

如果要让http_proxy能透过sudo传递给apt-get或者gem install,需要在/etc/sudoers里面添加如下配置:

Defaults env_keep = "http_proxy ftp_proxy" 
0.2 添加第三方仓库: EPEL (对于Debian/Ubuntu不用这一步)
cat > /etc/yum.repos.d/fedora-epel.repo <<EOF
[fedora-epel]
name=Extra Packages for Enterprise Linux $releasever - $basearch
baseurl=http://cn.archive.ubuntu.com/fedora-epel/$releasever/$basearch/
enabled=1
gpgcheck=0
gpgkey=
EOF

yum check-update

然后就可以用 yum install wget curl python-pygments 来安装EPEL上的第三方包了。

 

转载于:https://www.cnblogs.com/SZLLQ2000/p/5226556.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值