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

Git设置代理

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

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://8158.red/post/9.html

分享给朋友:

相关文章

VPS常用一键安装

VPS常用一键安装

ssr.sh1bbr.sh1SSR、BBR...

AI绘画遇见的坑

pip安装内存炸python -m pip install torch==1.13.1+cu117 torchvision==0.14.1+cu117 --extra-index-...

FaceFusion换脸AI技术使用以及部署教程

FaceFusion换脸AI技术使用以及部署教程

一、介绍:前些日子比较火的换脸AI技术是Roop,但是Roop已经停止更新了,好像是因为团队成员用这个东西搞颜色吧。不知道为什么又搞了个FaceFusion,以后的更新也会围绕着FaceFusion啦。不知道是不是心理作用,总感觉FaceF...

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

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

发表评论

访客

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