- Failed to connect to github.com port 443 解决方案
参考:https://zhuanlan.zhihu.com/p/670646102
- 多个账号切换
参考:https://worktile.com/kb/ask/224209.html
- bash代码
| 1. **Remove the existing GitHub account from WebStorm:** |
| - Go to `Preferences` > `Version Control` > `GitHub`. |
| - Select the existing account and click the `-` button to remove it. |
| |
| 2. **Add multiple GitHub accounts:** |
| - In the same `Preferences` > `Version Control` > `GitHub` section, click the `+` button. |
| - Choose `Log In via GitHub` and follow the authentication steps to add each of your GitHub accounts. |
| |
| 3. **Configure SSH keys for each GitHub account:** |
| - Generate a new SSH key for each GitHub account: |
| ```sh |
| ssh-keygen -t rsa -b 4096 -C "your_email@example.com" |
| ``` |
| - Add the SSH key to the corresponding GitHub account: |
| ```sh |
| ssh-add ~/.ssh/id_rsa |
| ``` |
| - Copy the SSH key to your clipboard: |
| ```sh |
| pbcopy < ~/.ssh/id_rsa.pub |
| ``` |
| - Add the SSH key to your GitHub account via GitHub's web interface. |
| |
| 4. **Create an SSH config file to manage multiple keys:** |
| - Edit or create the `~/.ssh/config` file: |
| ```sh |
| touch ~/.ssh/config |
| nano ~/.ssh/config |
| ``` |
| - Add the following configuration for each GitHub account: |
| ```sh |
| Host github.com-ACCOUNT1 |
| HostName github.com |
| User git |
| IdentityFile ~/.ssh/id_rsa_account1 |
| |
| Host github.com-ACCOUNT2 |
| HostName github.com |
| User git |
| IdentityFile ~/.ssh/id_rsa_account2 |
| ``` |
| |
| 5. **Update the remote URL for your repositories:** |
| - Open the terminal in WebStorm. |
| - Use the following command to update the remote URL to use the correct SSH configuration: |
| ```sh |
| git remote set-url origin git@github.com-ACCOUNT1:USERNAME/REPOSITORY_NAME.git |
| ``` |
| |
| 6. **Verify the changes:** |
| - Use the following command to verify the remote URL: |
| ```sh |
| git remote -v |
| ``` |
| |
- push/pull超时问题
参考:https://www.cnblogs.com/spriteZzz/p/17227579.html
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 单元测试从入门到精通
· 上周热点回顾(3.3-3.9)
· winform 绘制太阳,地球,月球 运作规律