GIT PULL 有效但 GIT PUSH 无效?

GIT PULL is working but GIT PUSH isn't?

我在推送到 git 时遇到问题。每当我执行 "git pull," 时,它都会从我需要的回购中提取。但是,当我提交后执行 "git push" 时,出现以下错误:

  Permission denied
  fatal: Could not read from remote repository.

  Please make sure you have the correct access rights
  and the repository exists.

我验证了我的 ssh 密钥是准确的。我只有一个 ssh 密钥,所以我认为 git 不太可能使用了错误的密钥。 "git pull" 工作正常。 "My git config --list" 显示如下:

  user.name=myusername
  user.email=myemail
  push.default=current
  remote.origin.url=theCorrectURL
  branch.thebranchiwannapushto.remote=origin
  branch.thebranchiwannapushto.merge=refs/heads/branchname
  mergetool.prompt=false

您可能需要配置推送引用规范以确保推送完成到所需的分支。也许你只有某些分支的推送权限。