总结以下自己遇到的问题,解决方法可能不适用于所有人
问题:
1、Permission denied
解决方法:
很明显,权限不足,如果要使用,通过如下命令进行授权即可:
sudo chmod -R 777 要操作的目录地址
2、
解决方法:
GitHub的Preferences设置里
- github账户用自己的私有账户
- Git里的配置写公司的git帐号
公司项目的账号下面重装SSH
-
Open a terminal on Linux or macOS, or Git Bash / WSL on Windows.
-
Generate a new ED25519 SSH key pair:
-
ssh-keygen -t ed25519 -C "email@example.com"
-
Or, if you want to use RSA:
-
ssh-keygen -o -t rsa -b 4096 -C "email@example.com"
-
The -C flag adds a comment in the key in case you have multiple of them
-
and want to tell which is which. It is optional. Next, you will be
prompted to input a file path to save your SSH key pair to. If you
don’t already have an SSH key pair and aren’t generating a deploy
key, use the suggested path by pressing Enter. Using the suggested
path will normally allow your SSH client to automatically use the
SSH key pair with no additional configuration. -
If you already have an SSH key pair with the suggested file path,
you will need to input a new file path and declare what host this
SSH key pair will be used for in your ~/.ssh/config file. -
Once the path is decided, you will be prompted to input a password
to secure your new SSH key pair. It’s a best practice to use a
password, but it’s not required and you can skip creating it by
pressing Enter twice. -
If, in any case, you want to add or change the password of your SSH
key pair, you can use the -p flag: -
ssh-keygen -p -o -f
-
Now, it’s time to add the newly created public key to your GitLab account.
在GitHub上重新拉取组件库
3、VSCode目录乱码问题
解决方法:
Mac 用户和 Linux 用户通过在您的终端中运行以下命令之一来安装。可以安装通过 curl 或 wget 命令行。
via curl
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
via wget
sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
4、vscode 插件开发 typescript部分报错 Object is possibly ‘undefined’.
在tsconfig.js中:
strict设置false状态
{
"compilerOptions": {
"strict": false,
//...
}
}
5、
iTerm启动提示:zsh compinit 问题
问题日志:
[oh-my-zsh] For safety, we will not load completions from these directories until
[oh-my-zsh] you fix their permissions and ownership and restart zsh.
[oh-my-zsh] See the above list for directories with group or other writability.
[oh-my-zsh] To fix your permissions you can do so by disabling
[oh-my-zsh] the write permission of "group" and "others" and making sure that the
[oh-my-zsh] owner of these directories is either root or your current user.
[oh-my-zsh] The following command may help:
[oh-my-zsh] compaudit | xargs chmod g-w,o-w
解决方法:
执行:
compaudit
查看一下列出的目录不安全的目录
然后执行以下语句给对应的目录赋权限即可
cd 不安全目录
sudo chmod -R 755 不安全目录
后边再启动iTerm就不会提示了。