简体   繁体   English

Git获取不适用于私人回购

[英]Git fetch won't work for private repo

I have a project in git repository which makes use of a library in another repository. 我在git仓库中有一个项目,该项目利用了另一个仓库中的库。 For that I am adding the library repository as a remote and link with the project. 为此,我将库存储库添加为远程库并与项目链接。 It was working fine with bitbucket repositories (public) but when I moved the library to a Github private repository the fetch does not work. 可以在bitbucket存储库(公共)上正常工作,但是当我将库移至Github专用存储库时,无法进行抓取。 It doesn't throw any error but it just does not fetch any file. 它不会引发任何错误,但不会获取任何文件。 Could it be something related with the fact that the library is in a private repository now? 这可能与该库现在位于私有存储库中有关吗? And is there a way to accomplish this? 有没有办法做到这一点?

These are the steps I used: 这些是我使用的步骤:

git remote add library https://XXXX@bitbucket.org/XXXX.git
git fetch library

Use a different scheme: 使用其他方案:

git remote add library https://<username>@bitbucket.org/<username>/<repo>.git

Note, <username> is used twice. 注意, <username>被使用两次。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM