diff --git a/source/_posts/Docker-Compose.md b/source/_posts/Docker-Compose.md index c04063c..3384741 100644 --- a/source/_posts/Docker-Compose.md +++ b/source/_posts/Docker-Compose.md @@ -17,7 +17,9 @@ tags: 上传到linux中 ```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 ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose ``` diff --git a/source/_posts/Git.md b/source/_posts/Git.md index 8912649..143e1eb 100644 --- a/source/_posts/Git.md +++ b/source/_posts/Git.md @@ -90,6 +90,62 @@ git config --global credential.helper wincred ## 储藏 (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配置 + ![image-20250416142637966](http://minio.wenyongdalucky.club:9000/hexo/image-20250416142637966.png) + 启动 **PuTTY Key Generator** + +6. 依次点击 + ![image-20250416151051085](http://minio.wenyongdalucky.club:9000/hexo/image-20250416151051085.png) + +7. PPKfile version 选择 2 + ![image-20250416151128595](http://minio.wenyongdalucky.club:9000/hexo/image-20250416151128595.png) + +8. 选择之前生成的id_rsa + ![image-20250416151307312](http://minio.wenyongdalucky.club:9000/hexo/image-20250416151307312.png) + +9. 出现如下,选择 **Save private key** 保存秘钥 + ![image-20250416151416275](http://minio.wenyongdalucky.club:9000/hexo/image-20250416151416275.png) + +10. 保存到 ~/.ssh 目录即可 + ![image-20250416151503685](http://minio.wenyongdalucky.club:9000/hexo/image-20250416151503685.png) + +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 ## push/pull老是超时解决方法 diff --git a/source/_posts/Typora.md b/source/_posts/Typora.md index 70fb5fa..63db369 100644 --- a/source/_posts/Typora.md +++ b/source/_posts/Typora.md @@ -128,3 +128,67 @@ Windows Registry Editor Version 5.00 ![image-20221121130426162](https://markdownhexo.oss-cn-hangzhou.aliyuncs.com/img/image-20221121130426162.png) ![image-20221121130857072](https://markdownhexo.oss-cn-hangzhou.aliyuncs.com/img/image-20221121130857072.png) + +## 上传图片至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设置 + +![image-20250416154513069](http://minio.wenyongdalucky.club:9000/hexo/image-20250416154513069.png) diff --git a/source/_posts/VsCode.md b/source/_posts/VsCode.md new file mode 100644 index 0000000..c522ebb --- /dev/null +++ b/source/_posts/VsCode.md @@ -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 + HostName + Port 22 + User + IdentityFile C:/Users/user/.ssh/id_rsa + PreferredAuthentications publickey +``` + +在要连接的远程服务器上保存公钥,使用要进行连接的用户进行登录 + +```shell +vim ~/.ssh/authorized_keys +``` + +将秘钥对应的公钥复制上去 + +![image-20250416155023228](http://minio.wenyongdalucky.club:9000/hexo/image-20250416155023228.png) + +保存即可 + +编辑 **sshd_config** + +```shell +vim /etc/ssh/sshd_config + +# 使用 /PubkeyAuthentication 查找 +# 编辑,取消注释,并将no 改为yes +PubkeyAuthentication yes + +# :wq 保存 +# 重启sshd服务 +systemctl restart sshd +``` + +Windows `~/.ssh` 目录属性中 安全 -> 高级 + +![image-20250416155557565](http://minio.wenyongdalucky.club:9000/hexo/image-20250416155557565.png) + +需 停用继承,我这里已经停用 + +![image-20250416155636248](http://minio.wenyongdalucky.club:9000/hexo/image-20250416155636248.png) + +然后点击 添加,选择主体 + +![image-20250416155715122](http://minio.wenyongdalucky.club:9000/hexo/image-20250416155715122.png) + +选择高级 + +![image-20250416155749520](http://minio.wenyongdalucky.club:9000/hexo/image-20250416155749520.png) + +点击 立即查找 + +![image-20250416155823198](http://minio.wenyongdalucky.club:9000/hexo/image-20250416155823198.png) + +选择 Administrator 和 SYSTEM + +![image-20250416155859285](http://minio.wenyongdalucky.club:9000/hexo/image-20250416155859285.png) + +![image-20250416155914072](http://minio.wenyongdalucky.club:9000/hexo/image-20250416155914072.png) + +点击两次 确定后,将 基本权限改为 完全控制 + +![image-20250416155949694](http://minio.wenyongdalucky.club:9000/hexo/image-20250416155949694.png) + +再次点击确定 + +重复上述步骤,将 当前系统登录用户 添加,不需要勾选完全控制 即可 diff --git a/source/_posts/大模型.md b/source/_posts/大模型.md index bcf3600..e28495f 100644 --- a/source/_posts/大模型.md +++ b/source/_posts/大模型.md @@ -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