gpt4 book ai didi

git - 远程 : repository not found fatal: not found

转载 作者:IT王子 更新时间:2023-10-29 01:23:51 63 4
gpt4 key购买 nike

为什么我的 git 不推送?我创建了存储库,但不断收到此消息:

C:\Users\petey_000\rails_projects\first_app>git push -u github master
Username for 'https://github.com': ***@gmail.com
Password for 'https://***@gmail.com@github.com':
remote: Repository not found.
fatal: repository 'https://github.com/pete/first_app.git/' not found

最佳答案

您的用户名不应是电子邮件地址,而应是您的 GitHub 用户帐户:pete
您的密码应该是您的 GitHub 帐户密码(2014 年)。

2021 年更新:您的密码应该是(自 Aug. 2021 起)一个 PAT (Personal Access Token) .

您实际上可以直接在远程 url 中设置您的用户名,以便 Git 仅请求您的密码:

cd C:\Users\petey_000\rails_projects\first_app
git remote set-url origin https://pete@github.com/pete/first_app

并且您需要首先在 GitHub 上创建 fist_app 存储库:确保创建它完全为空,或者,如果您使用初始提交创建它(包括README.md,一个许可文件和一个 .gitignore 文件),然后先执行 git pull,然后再进行 git push

关于git - 远程 : repository not found fatal: not found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25337199/

63 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com