Cursor Origin Git 推送失败怎么查
Origin 早期 beta:clone/push 失败先 origin auth login;PATH 缺 ~/.local/bin 会 command not found。HTTPS 远程为 origin.cursor.com。

cursor origin git 推送失败怎么办:官方文档把 clone/push 失败的第一件事写成确认已登录:origin auth login。Origin CLI 登录会装 git credential helper,之后对 https://origin.cursor.com/{owner}/{repo}.git 的 push/pull 一般不用再手填令牌。远程写错成 github.com、或根本没装 origin 命令,都会表现为「认证失败」或「找不到命令」。
先分清三种失败
装完脚本后 shell 报 command not found: origin:二进制默认在 ~/.local/bin。zsh 把 export PATH="$HOME/.local/bin:$PATH" 写进 ~/.zshrc 再 source。安装步骤见 Origin CLI 怎么安装。
origin 能跑但 git push 要密码、403:没走 origin auth login,或登录的 Cursor 账号没有该仓写权限。企业关掉 Origin 时,个人再 login 也推不上去,见 企业怎么退出。
远程 URL 不对:Code 按钮 HTTPS 形如 https://origin.cursor.com/acme/checkout.git。把 GitHub URL 和 Origin URL 糊成一个 remote,push 会去错地方。
已有本地仓怎么接
git remote add origin https://origin.cursor.com/{owner}/{repo}.git
git push -u origin main
评估期要 GitHub 和 Origin 双写,文档给的是给同一个 remote 加两条 pushurl:
git remote set-url --add --push origin [email protected]:acme/checkout.git
git remote set-url --add --push origin https://origin.cursor.com/acme/checkout.git
完整历史从 GitHub 搬过来,用镜像,不要指望双 pushurl 代替镜像。镜像步骤见 镜像 GitHub。
推上去了但网页是旧的
浏览页滞后时,先看是不是看错分支。镜像仓以 GitHub 为 source of truth,推 Origin 会透传到 GitHub;若你 Detach 过,再推 Origin 不会回 GitHub。Settings → General 看同步状态。
代理或公司 SSL 检查会拆 origin.cursor.com 的 HTTPS。证书报错先让网络放行该域名,再查 token。免费计划没有 Origin,付费席位未开通 codebase 时 login 成功也没有可写仓。
推送被拒还有一种:仓是 Private,你的 Cursor 账号不在 Permissions 里。Internal 仓对有 codebase 访问权的同事可见,并不自动等于人人可写。开 PR 前先能 git push 到自己的分支,流程见 Origin 怎么开 PR。