github修改用户名和密码

github修改用户名和密码

🧩 一、修改 GitHub 用户名(username)

✅ 1️⃣ 网页修改(推荐)

  1. 登录 https://github.com
  2. 点击右上角头像 → Settings
  3. 左侧栏选择 Account
  4. 找到 Change username → 输入新用户名 → Update username
🔸 修改用户名不会丢失代码仓库,但:旧的 https://github.com/oldname/repo.git 会自动重定向;但最好更新你本地仓库的远程地址。

✅ 2️⃣ 更新本地仓库的远程地址

如果你之前使用:

https://github.com/oldname/myrepo.git 

修改后执行:

git remote set-url origin https://github.com/newname/myrepo.git 

查看是否成功:

git remote -v 

🔐 二、修改 GitHub 密码(或令牌)

GitHub 2021年起 已不再支持密码推送代码
推送需要使用 Personal Access Token (PAT)

✅ 1️⃣ 修改 GitHub 登录密码(网页)

  1. 登录 GitHub → 点击头像 → Settings
  2. 左侧选择 Password and authentication
  3. Change password 部分输入旧密码和新密码。

✅ 2️⃣ 修改 Git 推送认证方式(命令行)

如果你用 HTTPS 推送

旧版本可能还保存了密码,现在要改成使用 Token

  1. 先生成新 Token
    • 进入 https://github.com/settings/tokens
    • 点击 Generate new token → classic
    • 勾选权限:reporead:orgworkflow(视情况)
    • 复制生成的 Token
    • Username: 你的 GitHub 用户名
    • Password: 粘贴刚才的 Token

再次执行推送:

git push origin main 

会提示输入用户名和密码,此时:

在本地仓库中更新凭证:

git credential-cache exitgit credential reject https://github.com 

✅ 3️⃣ 如果你使用 SSH 推送

检查 .ssh/config,或重新生成公钥:

ssh-keygen -t ed25519 -C "[email protected]"cat ~/.ssh/id_ed25519.pub 

然后将公钥粘贴到:
👉 https://github.com/settings/keys

测试连接:

ssh -T [email protected] 

📦 三、常用验证命令

检查项命令
查看当前远程地址git remote -v
更新远程地址git remote set-url origin <new_url>
清除旧凭证缓存git credential reject https://github.com
测试 HTTPS 推送git ls-remote https://github.com/<user>/<repo>.git
测试 SSH 推送ssh -T [email protected]

Read more

学生党申请github教育优惠到获取github-copilot pro一条龙教程

学生党申请github教育优惠到获取github-copilot pro一条龙教程

25年9月最新 申请GitHub教育优惠 到 获取GitHub co-pilot pro 一条龙教程(需要自备edu教育邮箱) 2025.9.4 博主亲测有效,可申请到两年教育优惠,无论您是否为在校学生,只要有一个可用的教育邮箱即可申请 by ZEEKLOG:Rem丶昕 注意:本教程的所有填写全部用英文! 一、前期准备 1. 需要自备自己学校的 edu 教育邮箱,例如博主的教育邮箱格式为 [email protected],准备的 edu 邮箱得搜索到对应的学校 2. 想申请教育邮箱的GitHub账号不能是新号,至少注册时间3天以上 二、绑定 edu 教育邮箱 2.1 在GitHub设置中添加自己的教育邮箱 登录 GitHub,点击右上方头像,在下拉列表中选 Settings

By Ne0inhk
LLaMA-Factory安装教程(详细版)

LLaMA-Factory安装教程(详细版)

本机显卡双3090 使用wsl中ubuntu torch==2.6.0 conda==24.5.0 cuda==12.4 python==3.12.4(python安装不做赘述,有需要我会另开一篇文章) 一、准备工作 首先,在 https://developer.nvidia.com/cuda-gpus 查看您的 GPU 是否支持CUDA。 保证当前 Linux 版本支持CUDA. 在命令行中输入  uname -m && cat /etc/*release 输出如下,不一定完全一样,类似即可 检查是否安装了 gcc . 在命令行中输入 gcc --version

By Ne0inhk
高效AIGC工具推荐:10个热门平台免费与付费功能全指南

高效AIGC工具推荐:10个热门平台免费与付费功能全指南

�� 10大降AIGC平台核心对比速览 排名 工具名称 降AIGC效率 适用场景 免费/付费 1 askpaper ⭐⭐⭐⭐⭐ 学术论文精准降AI 付费 2 秒篇 ⭐⭐⭐⭐⭐ 快速降AIGC+降重 付费 3 Aibiye ⭐⭐⭐⭐ 多学科论文降AI 付费 4 Aicheck ⭐⭐⭐⭐ AI检测+降重一体化 付费 5 白果AI论文 ⭐⭐⭐ 格式规范+降AI 免费/付费 6 文赋AI论文 ⭐⭐⭐ 初稿生成+降AI 免费/付费 7 笔尖AI写作 ⭐⭐⭐ 多场景降AI 免费 8 梅子AI论文 ⭐⭐⭐ 学历适配降AI 付费 9 闪稿AI论文 ⭐⭐ 紧急降AI处理 免费 10

By Ne0inhk

node-llama-cpp安装与配置:Windows、Linux和Mac全平台教程

node-llama-cpp安装与配置:Windows、Linux和Mac全平台教程 【免费下载链接】node-llama-cppRun AI models locally on your machine with node.js bindings for llama.cpp. Force a JSON schema on the model output on the generation level 项目地址: https://gitcode.com/gh_mirrors/no/node-llama-cpp node-llama-cpp是一个基于llama.cpp的Node.js绑定库,让你能够在本地机器上运行AI模型,并在生成级别强制模型输出符合JSON模式。本文将为你提供Windows、Linux和Mac全平台的安装与配置教程,帮助你快速上手这款强大的AI工具。 一、准备工作 在开始安装node-llama-cpp之前,请确保你的系统满足以下要求:

By Ne0inhk