提交,增加VsCode文章
This commit is contained in:
parent
d6b0eba686
commit
d5f992c21e
@ -17,7 +17,9 @@ tags:
|
|||||||
上传到linux中
|
上传到linux中
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
mv docker-compose-linux-x86_64 /usr/local/bin/ docker-compose
|
mv docker-compose-linux-x86_64 /usr/local/bin/
|
||||||
|
cd /usr/local/bin/
|
||||||
|
mv docker-compose-linux-x86_64 docker-compose
|
||||||
chmod +x /usr/local/bin/docker-compose
|
chmod +x /usr/local/bin/docker-compose
|
||||||
ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
|
ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
|
||||||
```
|
```
|
||||||
|
|||||||
@ -90,6 +90,62 @@ git config --global credential.helper wincred
|
|||||||
|
|
||||||
## 储藏 (Stash)
|
## 储藏 (Stash)
|
||||||
|
|
||||||
|
## SSH提交
|
||||||
|
|
||||||
|
1. SSH 秘钥默认储存在账户的主目录下的 ~/.ssh 目录
|
||||||
|
如:`C:\Users\用户\.ssh\`
|
||||||
|
|
||||||
|
查看是否包含id_rsa和id_rsa.pub(或者是id_dsa和id_dsa.pub之类成对的文件),有`.pub 后缀的文件`就是**公钥**,另一个文件则是密钥。
|
||||||
|
|
||||||
|
如果有这两个文件,则跳过1.2;如果没有这两个文件,甚至.ssh目录也没有,则需要用ssh-keygen 来创建
|
||||||
|
|
||||||
|
2. ###### 生成密钥信息
|
||||||
|
|
||||||
|
在`.ssh 目录`下右键打开[Git Bash](https://so.csdn.net/so/search?q=Git Bash&spm=1001.2101.3001.7020)(.ssh目录不存在,则在任一目录下操作,或者手动创建该目录)
|
||||||
|
|
||||||
|
3. ###### 生成密钥
|
||||||
|
|
||||||
|
> ssh-keygen -t rsa -C "注释信息(一般为邮箱your_email@youremail.com)"
|
||||||
|
|
||||||
|
4. 在~/.ssh/下会生成两个文件,id_rsa和id_rsa.pub
|
||||||
|
|
||||||
|
> id_rsa是私钥
|
||||||
|
>
|
||||||
|
> id_rsa.pub是公钥
|
||||||
|
|
||||||
|
5. SourceTree配置
|
||||||
|

|
||||||
|
启动 **PuTTY Key Generator**
|
||||||
|
|
||||||
|
6. 依次点击
|
||||||
|

|
||||||
|
|
||||||
|
7. PPKfile version 选择 2
|
||||||
|

|
||||||
|
|
||||||
|
8. 选择之前生成的id_rsa
|
||||||
|

|
||||||
|
|
||||||
|
9. 出现如下,选择 **Save private key** 保存秘钥
|
||||||
|

|
||||||
|
|
||||||
|
10. 保存到 ~/.ssh 目录即可
|
||||||
|

|
||||||
|
|
||||||
|
11. 在 **Sourcetree** 中 **工具** -> **选项** 中选择刚刚保存的 ppk文件即可
|
||||||
|
|
||||||
|
## 变更SSH pubKey comment
|
||||||
|
|
||||||
|
> [Change an SSH key comment](https://www.commands.dev/workflows/change_ssh_key_comment)
|
||||||
|
|
||||||
|
```
|
||||||
|
# new_comment 新的注释
|
||||||
|
# ssh_key_path ssh私钥路径 ~/.ssh/id_rsa
|
||||||
|
ssh-keygen -c -C "new_comment" -f ssh_key_path
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# github
|
# github
|
||||||
|
|
||||||
## push/pull老是超时解决方法
|
## push/pull老是超时解决方法
|
||||||
|
|||||||
@ -128,3 +128,67 @@ Windows Registry Editor Version 5.00
|
|||||||

|

|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
## 上传图片至Minio
|
||||||
|
|
||||||
|
### 安装pipgo
|
||||||
|
|
||||||
|
使用 npm 全局安装
|
||||||
|
|
||||||
|
```shell
|
||||||
|
npm install picgo -g
|
||||||
|
```
|
||||||
|
|
||||||
|
安装成功后,输入以下命令查看是否安装成功
|
||||||
|
|
||||||
|
```shell
|
||||||
|
picgo -v
|
||||||
|
```
|
||||||
|
|
||||||
|
### 安装Minio插件
|
||||||
|
|
||||||
|
```shell
|
||||||
|
picgo install minio
|
||||||
|
```
|
||||||
|
|
||||||
|
安装完成后,输入以下命令查看是否安装成功
|
||||||
|
|
||||||
|
```shell
|
||||||
|
picgo use plugins
|
||||||
|
```
|
||||||
|
|
||||||
|
### 编辑pipgo配置文件
|
||||||
|
|
||||||
|
通常位于`~/.picgo/config.json`
|
||||||
|
|
||||||
|
```shell
|
||||||
|
{
|
||||||
|
"picBed": {
|
||||||
|
"current": "minio",
|
||||||
|
"minio": {
|
||||||
|
"endpoint": "your-minio-endpoint", // MinIO服务器地址
|
||||||
|
"port": 9000, // MinIO端口,默认9000
|
||||||
|
"accessKey": "your-access-key", // MinIO访问密钥
|
||||||
|
"secretKey": "your-secret-key", // MinIO私有密钥
|
||||||
|
"bucket": "your-bucket-name", // 存储桶名称
|
||||||
|
"path": "img/", // 存储路径(可选)
|
||||||
|
"useSSL": false, // 是否使用SSL(默认false)
|
||||||
|
"customDomain": "", // 自定义域名
|
||||||
|
"pathFormat": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"picgoPlugins": {
|
||||||
|
"picgo-plugin-minio": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### 测试上传
|
||||||
|
|
||||||
|
```shell
|
||||||
|
picgo upload /path/to/your/image.png
|
||||||
|
```
|
||||||
|
|
||||||
|
### Typora设置
|
||||||
|
|
||||||
|

|
||||||
|
|||||||
83
source/_posts/VsCode.md
Normal file
83
source/_posts/VsCode.md
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
---
|
||||||
|
title: VsCode
|
||||||
|
date: 2025-04-16 15:18:28
|
||||||
|
tags:
|
||||||
|
---
|
||||||
|
|
||||||
|
# 插件
|
||||||
|
|
||||||
|
## Remote - SSH
|
||||||
|
|
||||||
|
### 配置远程连接Linux密码免登录
|
||||||
|
|
||||||
|
编辑配置文件,一般位于`~/.ssh/config`
|
||||||
|
|
||||||
|
```shell
|
||||||
|
# Read more about SSH config files: https://linux.die.net/man/5/ssh_config
|
||||||
|
Host <host>
|
||||||
|
HostName <host_name>
|
||||||
|
Port 22
|
||||||
|
User <user>
|
||||||
|
IdentityFile C:/Users/user/.ssh/id_rsa
|
||||||
|
PreferredAuthentications publickey
|
||||||
|
```
|
||||||
|
|
||||||
|
在要连接的远程服务器上保存公钥,使用要进行连接的用户进行登录
|
||||||
|
|
||||||
|
```shell
|
||||||
|
vim ~/.ssh/authorized_keys
|
||||||
|
```
|
||||||
|
|
||||||
|
将秘钥对应的公钥复制上去
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
保存即可
|
||||||
|
|
||||||
|
编辑 **sshd_config**
|
||||||
|
|
||||||
|
```shell
|
||||||
|
vim /etc/ssh/sshd_config
|
||||||
|
|
||||||
|
# 使用 /PubkeyAuthentication 查找
|
||||||
|
# 编辑,取消注释,并将no 改为yes
|
||||||
|
PubkeyAuthentication yes
|
||||||
|
|
||||||
|
# :wq 保存
|
||||||
|
# 重启sshd服务
|
||||||
|
systemctl restart sshd
|
||||||
|
```
|
||||||
|
|
||||||
|
Windows `~/.ssh` 目录属性中 安全 -> 高级
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
需 停用继承,我这里已经停用
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
然后点击 添加,选择主体
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
选择高级
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
点击 立即查找
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
选择 Administrator 和 SYSTEM
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
点击两次 确定后,将 基本权限改为 完全控制
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
再次点击确定
|
||||||
|
|
||||||
|
重复上述步骤,将 当前系统登录用户 添加,不需要勾选完全控制 即可
|
||||||
@ -323,7 +323,45 @@ modelscope download --model deepseek-ai/DeepSeek-R1-Distill-Qwen-7B README.md --
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
2.
|
2. conda 安装后没有将conda置为默认
|
||||||
|
|
||||||
|
```shell
|
||||||
|
Do you wish to update your shell profile to automatically initialize conda?
|
||||||
|
This will activate conda on startup and change the command prompt when activated.
|
||||||
|
If you'd prefer that conda's base environment not be activated on startup,
|
||||||
|
run the following command when conda is activated:
|
||||||
|
|
||||||
|
conda config --set auto_activate_base false
|
||||||
|
|
||||||
|
You can undo this by running `conda init --reverse $SHELL`? [yes|no]
|
||||||
|
[no] >>>
|
||||||
|
|
||||||
|
You have chosen to not have conda modify your shell scripts at all.
|
||||||
|
To activate conda's base environment in your current shell session:
|
||||||
|
|
||||||
|
eval "$(/home/user/miniconda3/bin/conda shell.YOUR_SHELL_NAME hook)"
|
||||||
|
|
||||||
|
To install conda's shell functions for easier access, first activate, then:
|
||||||
|
|
||||||
|
conda init
|
||||||
|
|
||||||
|
Thank you for installing Miniconda3!
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
则执行以下shell
|
||||||
|
|
||||||
|
```shell
|
||||||
|
# eval "$(/home/user/miniconda3/bin/conda shell.SHELL_NAME hook)"
|
||||||
|
# bash 下
|
||||||
|
eval "$(/home/user/miniconda3/bin/conda shell.bash hook)"
|
||||||
|
conda init
|
||||||
|
# zsh 下
|
||||||
|
eval "$(/home/user/miniconda3/bin/conda shell.zsh hook)"
|
||||||
|
conda init
|
||||||
|
```
|
||||||
|
|
||||||
|
3.
|
||||||
|
|
||||||
# Jupyter Notebook
|
# Jupyter Notebook
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user