我正在创建新的分支并尝试推送该分支(我已经尝试了以下命令):
但是在这两种情况下,我都遇到了这个错误:
这是我的 .git/config 文件:
git push origin new_branch
git push --all -u
git push origin NewBranch
但是在这两种情况下,我都遇到了这个错误:
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
这是我的 .git/config 文件:
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
precomposeunicode = true
[remote "origin"]
url = ssh://git@github.com/myName/myRepo.git
fetch = +refs/heads/*:refs/remotes/origin/*
pushurl = ssh://git@github.com/myName/myRepo.git
这是原始内容:
origin ssh://git@github.com/myName/myRepo.git (fetch)
origin ssh://git@github.com/myName/myRepo.git (push)
你们中有人知道这个错误的原因吗?
非常感谢你们的帮助。
//
和@
之间的部分应该是你的用户名。我假设你的用户名可能不是git
。 - Mark Adelsberger