当前位置:首页 > VPS > 正文内容

Git设置代理

骑马路人甲2年前 (2022-05-16)VPS1679

00:00

install.sh1

Git设置代理

有时候配置了V2ray但是推送和拉取还总是超时,原来是没走代理,得需要手动配置如下:


设置代理

1.http || https协议


//设置全局代理

//http

git config --global https.proxy http://127.0.0.1:1080

//https

git config --global https.proxy https://127.0.0.1:1080

//使用socks5代理的 例如ss,ssr 1080是windows下ss的默认代理端口,mac下不同,或者有自定义的,根据自己的改

git config --global http.proxy socks5://127.0.0.1:1080

git config --global https.proxy socks5://127.0.0.1:1080


//只对github.com使用代理,其他仓库不走代理

git config --global http.https://github.com.proxy socks5://127.0.0.1:1080

git config --global https.https://github.com.proxy socks5://127.0.0.1:1080

//取消github代理

git config --global --unset http.https://github.com.proxy

git config --global --unset https.https://github.com.proxy


//取消全局代理

git config --global --unset http.proxy

git config --global --unset https.proxy


修改SSH端口

nano /etc/ssh/sshd_config

sudo service ssh restart


apt-get update -y && apt-get install curl -y

bash <(curl -L -s https://raw.githubusercontent.com/wulabing/V2Ray_ws-tls_bash_onekey/master/install.sh) | tee v2ray_ins.log


站点配置


使用命令

apt install php-fpm -y

安装程序。

用命令

service php7.4-fpm status

检查是否安装成功


nginx配置文件位置 

/etc/nginx/conf/conf.d


添加:

location ~ \.php$ {

        #fastcgi_param  SCRIPT_FILENAME  /usr/local/nginx/html$fastcgi_script_name;

        #fastcgi_pass 127.0.0.1:9000;

        fastcgi_index index.php;

        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

        include fastcgi_params;

        fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;

}

添加测试代码

<?php        phpinfo();?>

重启服务

systemctl restart nginx


sudo apt install mysql-server

alter user root@localhost identified with mysql_native_password by '你的密码';

打赏

扫描二维码推送至手机访问。

版权声明:本文由骑马路人甲的BLOG发布,如需转载请注明出处。

本文链接:https://www.8158.red/post/9.html

分享给朋友:

相关文章

UBUNTU修改时区 同步时间

sudo tzselect根据需求选择所需时区保存时区数据sudo ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime写入系统设置hwclock --systohc查看并同步tim...

宝塔面板搭建V2ray详细教程

准备工作:准备一个域名和一台vps,并将域名解析到vps。Freenom 可以注册免费域名搭建好宝塔并安装nginx宝塔和nginx完成以后,回到vps SSH窗口执行命令bash <(curl -L&n...

杜绝 “此文件来自其他计算机,可能被阻止以帮助保护该计算机”出现

组策略修改,步骤如下:win键+R(或者点击:开始/运行)-->打开运行对话框-->输入“gpedit.msc”-->用户配置—-->管理模板-->windows组件-->附件管理器-->右侧窗口选...

发表评论

访客

◎欢迎参与讨论,请在这里发表您的看法和观点。