git:Github上的私有存储库出现“未找到存储库错误”

时间:2019-05-23 07:01:26

标签: git github

在尝试将分支推入原始位置时,我面临以下问题。 因此,我要做的是创建一个新分支,并在其上添加一个提交。然后试图推动。它显示,

  

致命:当前分支Hotfix / Update_ducusign_semail_subject_line   没有上游分支。推送当前分支并设置遥控器   作为上游,使用

git push --set-upstream origin Hotfix/Update_ducusign_semail_subject_line

然后,我运行以下命令

git push --set-upstream origin Hotfix/Update_ducusign_semail_subject_line

但是它给出了以下错误,

  

远程:找不到存储库。

     

致命:找不到存储库'https://github.com/nalam-nmef/NextGenTPR.git/'

enter image description here

这是什么问题?

2 个答案:

答案 0 :(得分:0)

如果您没有提供正确的凭据,Github不支持通过HTTPS连接到私有存储库。

您现在有两个选择:

  1. 切换到SSH并确保您的Github settings中的SSH密钥可用:
    git@github.com:nalam-nmef/NextGenTPR.git
  2. 使用personal access tokens为HTTPS变体提供凭据:
    https://nalam-nmef:[your-private-access-token-here]@github.com/nalam-nmef/NextGenTPR.git/

答案 1 :(得分:0)

您可以使用 github cli 轻松进行身份验证:

https://cli.github.com/