当前位置: 首页 > wzjs >正文

做企业网站需要人维护么滕州网站建设推广

做企业网站需要人维护么,滕州网站建设推广,大淘客网站如何建设,4399国语免费播放端口443在git bash向github推送时的步骤 你的环境可能因防火墙限制无法使用默认的 SSH 端口(22),因此需要改用 SSH over HTTPS(端口 443) 进行 Git 推送。 github与git bash绑定问题详见博主先前写过的参考博文&#…

端口443在git bash向github推送时的步骤

你的环境可能因防火墙限制无法使用默认的 SSH 端口(22),因此需要改用 SSH over HTTPS(端口 443) 进行 Git 推送。
github与git bash绑定问题详见博主先前写过的参考博文:
https://blog.csdn.net/2301_79012058/article/details/145613815?fromshare=blogdetail&sharetype=blogdetail&sharerId=145613815&sharerefer=PC&sharesource=2301_79012058&sharefrom=from_link
以下是完整步骤:

1. 确保 SSH 密钥已配置

① 生成 SSH 密钥(如果尚未生成)

ssh-keygen -t ed25519 -C "your-email@example.com"

(如果系统不支持 ed25519,改用 -t rsa -b 4096

② 将公钥添加到 GitHub

  • 复制公钥内容:

    cat ~/.ssh/id_ed25519.pub
    
  • 进入 GitHub Settings → SSH and GPG Keys → New SSH Key,粘贴并保存。


2. 配置 SSH 使用端口 443

① 修改 ~/.ssh/config

nano ~/.ssh/config

添加以下内容:

Host github.comHostname ssh.github.comUser gitPort 443IdentityFile ~/.ssh/id_ed25519  # 替换为你的私钥路径

保存并退出(Ctrl + XYEnter)。

② 测试 SSH 连接

ssh -T git@ssh.github.com

成功返回

Hi Westredtomato! You've successfully authenticated, but GitHub does not provide shell access.

如果失败,检查 ~/.ssh/config 是否拼写正确,并确保 SSH 密钥已添加到 GitHub。


3. 初始化 Git 仓库并设置远程 URL

① 初始化本地仓库

git init
git add .
git commit -m "Initial commit"

② 设置远程仓库 URL(使用 SSH over 443)

git remote add origin git@github.com:Westredtomato/aTestGitPractice.git

或(显式指定端口 443):

git remote add origin ssh://git@ssh.github.com:443/Westredtomato/aTestGitPractice.git

③ 检查远程 URL

git remote -v

正确输出

origin  git@github.com:Westredtomato/aTestGitPractice.git (fetch)
origin  git@github.com:Westredtomato/aTestGitPractice.git (push)
origin  ssh://git@ssh.github.com:443/Westredtomato/aTestGitPractice.git (fetch)
origin  ssh://git@ssh.github.com:443/Westredtomato/aTestGitPractice.git (push)

4. 推送代码到 GitHub

① 推送到 mastermain 分支

git push -u origin master

如果 GitHub 默认分支是 main(推荐):

git branch -M main  # 重命名本地分支
git push -u origin main

② 如果遇到 Permission denied

  • 检查 ~/.ssh/config 是否正确。

  • 确保 git remote -v 显示的是 git@github.comssh://git@ssh.github.com:443

  • 重新加载 SSH 代理:

    eval "$(ssh-agent -s)"
    ssh-add ~/.ssh/id_ed25519
    

5. 特殊情况处理

① 如果仍然无法连接

  • 改用 HTTPS(临时方案):

    git remote set-url origin https://github.com/Westredtomato/aTestGitPractice.git
    git push -u origin main
    

    (需要输入 GitHub 用户名和密码或 Personal Access Token)

  • 检查网络代理

    git config --global --unset http.proxy
    git config --global --unset https.proxy
    

② 如果远程分支不匹配

  • 本地 master,远程 main

    git branch -M main  # 重命名本地分支
    git push -u origin main
    

最终检查

  • SSH 连接测试

    ssh -T git@github.com
    
  • 远程 URL 检查

    git remote -v
    
  • 分支匹配

    git branch
    

文章转载自:

http://KVbQ1QIO.pfLry.cn
http://R0k6KPor.pfLry.cn
http://oGqCdAZt.pfLry.cn
http://fIkMdqq5.pfLry.cn
http://4UVnRmMR.pfLry.cn
http://IT6WNR47.pfLry.cn
http://WmADG1K3.pfLry.cn
http://ZBGLtXFn.pfLry.cn
http://mHssrRRQ.pfLry.cn
http://LWTiED09.pfLry.cn
http://meA232QI.pfLry.cn
http://aZU5JILi.pfLry.cn
http://b7RBRE4S.pfLry.cn
http://QgSNTqTd.pfLry.cn
http://LhO94GzV.pfLry.cn
http://p0DHQZLu.pfLry.cn
http://rnEd5DaK.pfLry.cn
http://4ff03W4v.pfLry.cn
http://arQq1DLm.pfLry.cn
http://pU57NvOU.pfLry.cn
http://D71JFcf1.pfLry.cn
http://kDaED6ho.pfLry.cn
http://HtQtBuMM.pfLry.cn
http://Op1o3rnH.pfLry.cn
http://8T2NUUaz.pfLry.cn
http://hxUP3QNa.pfLry.cn
http://IFWCWKz3.pfLry.cn
http://3dmslpor.pfLry.cn
http://hX1MzR0X.pfLry.cn
http://TF5ka7Qc.pfLry.cn
http://www.dtcms.com/wzjs/671120.html

相关文章:

  • 外贸平台网站网站建设与管理认识
  • 网站标题一样凡科网首页
  • 做网站不知道做什么内容的国外优秀设计公司网站
  • 站长资讯php网站开发周期多长
  • 服务器网站绑定域名网站建设与管理ppt模板
  • 怎么在阿里云建设网站做一下网站需要什么
  • 网络平台建站手把手教你学网站建设
  • wordpress分级菜单显示seo外链推广
  • 广州建设行业网站中国建设银行网站首页下载
  • 手机网站返回按钮怎么做网站如何做中英文切换
  • 金华网站建设工程网站建设公司建网站价格
  • 江阴做网站哪家好上海关键词排名搜索
  • 男女做爰视频免费网站郑州网站建设推销
  • 西乡网站建设公司邢台123交友信息手机版
  • 宁波网站推广工具114啦怎么建设网站
  • 网站做流量是怎么回事商城小程序搭建
  • 东莞网站建设方案咨询小广告清理整治
  • 越城区住房和城乡建设局网站wordpress定义数组
  • 宁波自适应网站建设优化建站微信小程序介绍
  • 男女做暧暧网站网站建设合同是否交印花税
  • 同一ip 网站 权重建设银行网站个人银行上不去
  • 做网站会提供源代码中国菲律宾友谊
  • 做网站学哪方面知识某网站做参考文献的书写
  • 网站开发如何跟客户沟通需求指数分布的分布函数
  • 哪种网站语言最好网站改版的意义
  • 电子书网站搭建教程云南省城乡和住房建设厅网站
  • 外贸婚纱网站职业教育网站建设
  • 怎么建设局域网网站专做老酒的网站
  • 网站不备案会有什么影响wordpress增加用户权限
  • 新余网站开发网站建设seo