# 1) 切回 HTTPS git remote set-url origin https://github.com/wafer-bob/DPO-SR.git git remote -v # 确认已是 https # 2) 关掉 VSCode/askpass/助手干扰,让终端要密码 git config --local --unset credential.helper 2>/dev/null || true git config --global --unset credential.helper 2>/dev/null || true git config --system --unset credential.helper 2>/dev/null || true git config --global core.askpass "" unset GIT_ASKPASS SSH_ASKPASS VSCODE_GIT_ASKPASS export GIT_TERMINAL_PROMPT=1 # 可选:清除历史残留的 github 凭据 sed -i.bak '/github\.com/d' ~/.git-credentials 2>/dev/null || true # 3) 设为最简单的凭据存储(输一次后续复用) git config --global credential.helper store # 4) 推送 git push -u origin main