换源代码汇总

引言

博主最近在折腾一个静态博客,使用vuepress-reco驱动,中途有网络问题遇到了很多麻烦,这里特别写一篇文章提醒自己以后在环境搭建的过程中还要对包管理器全局换源。初始操作中不仅是换源,还有git传输网络自动走系统proxy的代码,我也一并放在本文中。

代码

博主所用的开发环境如下:

>node -v
v18.20.4

>npm -v
10.7.0

>pnpm -v
9.7.1

>yarn -v
1.22.22

换源命令通用格式

淘宝源域名已经变更了,不过填原来的域名也没啥影响,但建议尽快改为新域名!
https://registry.npm.taobao.org => https://registry.npmmirror.com

修改源:

<npm|pnpm|yarn> config set registry https://registry.npm.taobao.org

检查配置:

<npm|pnpm|yarn> config get registry

实际输入命令的时候<>不用加,选一个在括号里的就好

Git跟随系统Proxy

上传到GitHub的时候,都是timeout的报错,那么在不修改超时时间的情况下,一条命令把传输自动跟随系统的proxy:

git config --global core.gitProxy "auto"

评论

6 条对“换源代码汇总”的回复

  1. 555winlol 的头像

    I am a big fan of 555winlol, it is my top choice for games! Sign up and you won’t regret it! You should give 555winlol a chance 555winlol.

  2. 52lotterylogin 的头像

    If you are a gambling enthuasist then 52lotterylogin could be for you. Fast and easy. You should login 52lotterylogin right away 52lotterylogin.

  3. tg777com 的头像

    Tg777com is worth a try. The interface is pretty smooth compared to its rivals. Good odds are a plus. Time to bag something big tg777com.

  4. slotspk32game 的头像

    Okay, slot fans, who’s been spinning at slotspk32game? Any tips for a newbie? Give them a spin at slotspk32game.

  5. sg777login 的头像

    Trying to log in to sg777login… anyone else having issues? Or am I just completely messing it up? Try to log in at sg777login later

  6. pk365game 的头像

    Pk365game e uma otima opção para quem busca jogos variados e com boa jogabilidade. Gostei bastante da facilidade de encontrar os jogos que procuro. Recomendo! pk365game

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注