【发布时间】:2021-11-18 08:46:27
【问题描述】:
早上好, 在网上 4 小时无用的教程之后,我在这里问我的问题。
- 我已创建 SSH 密钥并将其添加到 Github
- 然后我在 GitHub.com 上创建了一个名为“Repo”的存储库
- 然后我在我的计算机上创建了一个名为“Repo”的文件夹,并像往常一样初始化了 git:git.init 等...
- 但是,如果我想推一些东西,让我们说 README.md,之后:
git add README.md
git commit README.md
git status 返回"On the main branch Your branch is in advance of 3 commits upon 'origin/main' (Use "git push" to publish these local commits) Nothing to valid, the copy of your work is clean"
但是当我写的时候:
git push README.md
我明白了
"Please make sure you have the correct access rights and the repository exists"
那么,解释是什么?
ssh -T git@github.com 返回:“嗨 Aurelien!您已成功通过身份验证,但 GitHub 不提供 shell 访问权限。”所以我完全不明白这个问题。
编辑:git remote -v 返回:
origin git@github.com:Aurelien/Repo.git (fetch)
origin git@github.com:Aurelien/Repo.git (push)
【问题讨论】:
-
亲爱的马特,多么残酷的回答,但我接受它是因为我需要帮助。我修改我的消息以引用整个文本,即:“
git status返回"On the main branch Your branch is in advance of 3 commits upon 'origin/main' (Use "git push" to publish these local commits) Nothing to valid, the copy of your work is clean"。 -
您能否编辑您的问题以将
git remote -v的输出包含为代码块? -
您好 bk2204。我添加了输出。