gclient sync 報(bào)錯(cuò)

image.png

切換到 engine 目錄,執(zhí)行g(shù)client sync

1.設(shè)置代理

vi ~/.zshrc 文件中,添加如下代碼:

function proxy_off(){
        unset http_proxy
        unset https_proxy
        unset ftp_proxy
        unset rsync_proxy
        echo -e "已關(guān)閉代理"
}
#注意,根據(jù)自己的配置設(shè)置
function proxy_on() {
        export no_proxy="localhost,127.0.0.1,localaddress,.localdomain.com"
        export http_proxy="http://127.0.0.1:8001"
        export https_proxy=$http_proxy
        export ftp_proxy=$http_proxy
        export rsync_proxy=$http_proxy
        export HTTP_PROXY=$http_proxy
        export HTTPS_PROXY=$http_proxy
        export FTP_PROXY=$http_proxy
        export RSYNC_PROXY=$http_proxy
        echo -e "已開(kāi)啟代理"
}

執(zhí)行source ~/.zshrc,使其立刻生效。

2.設(shè)置一次proxy_on

需要使用代理時(shí)開(kāi)啟ss全局模式,然后打開(kāi)終端,輸入proxy_on就會(huì)啟動(dòng)。如果需要關(guān)閉,只需要輸入proxy_off。

proxy_on

3.判斷終端是否走了代理服務(wù)器

curl cip.cc

4.執(zhí)行g(shù)client sync

gclient sync
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容