英文:
Conflict with pushing commits using Sourcetree
问题
I have a problem with Sourcetree. 我在使用Sourcetree时遇到了问题。
I add two accounts, one from my company and second my private. 我添加了两个帐户,一个来自我的公司,另一个是我的私人帐户。
There is no problem with using my business repo, I can push, pull, clone etc. but... 使用我的业务存储库没有问题,我可以推送、拉取、克隆等等,但是...
I can clone my private repo, but I can't push changes. 我可以克隆我的私人存储库,但无法推送更改。
Pushing to github.com:SKdaaaas/Fin.git
ERROR: Permission to SKdaaaas/Fin.git denied to KKwwdasd.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Completed with errors, see above
SKdaaaas = My private GitHub username
KKwwdasd = My business GitHub username
推送到github.com: SKdaaaas/Fin.git
错误:拒绝对SKdaaaas/Fin.git的权限给予KKwwdasd。
致命错误:无法从远程存储库读取。
请确保您具有正确的访问权限
并且存储库存在。
已完成,有错误,请参见上文。
<details>
<summary>英文:</summary>
I have a problem with Sourcetree. I add two accounts, one from my company and second my private. There is no problem with using my business repo, I can push, pull, clone etc. but... I can clone my private repo, but I can't push changes.
Pushing to github.com:SKdaaaas/Fin.git
ERROR: Permission to SKdaaaas/Fin.git denied to KKwwdasd.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Completed with errors, see above
SKdaaaas = My private GitHub username
KKwwdasd = My business GitHub username
</details>
# 答案1
**得分**: 0
我理解的是,SourceTree默认使用一个GitHub账户。
在SourceTree中查看选项 -> 身份验证选项卡:
您的SourceTree设置似乎默认使用您的业务账户。如果这对您是一个选项,您可以将您的业务账户添加为您的私有仓库SKdaaaas/Fin的协作者。
<details>
<summary>英文:</summary>
My understanding is that SourceTree is taking one default account for github.com.
Take a look in SourceTree in Options -> Authentication tab:
[![enter image description here][1]][1]
Your SourceTree setup seems to use your business account by default. If this is an option for you, you could add your business account as a collaborator of your private repo SKdaaaas/Fin.
[1]: https://i.stack.imgur.com/inZXk.png
</details>
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论