I am trying to set up a private repository of Android source code while hosting the git trees on github as private repos.
I have no problem changing the manifest.xml file to point to public git trees hosted on github in the same way that CynagonMod does, but when trying to point to private repos I get the following error when trying "repo sync":
Initializing project username/android_external_webkit ...
fatal: The remote end hung up unexpectedly
error: Cannot fetch username/android_external_webkit
Where username/android_external_webkit is of course a private github repo of the same name.
I understand the error occurs since I did not specify my user name and credentials to github, but I fail to see how to do it in the manifest.xml with repo.
Any ideas?
Thanks! Gilad
Under your repository name, click Settings. Under "Danger Zone", to the right of to "Change repository visibility", click Change visibility. Select a visibility. To verify that you're changing the correct repository's visibility, type the name of the repository you want to change the visibility of.
When you create a repository, you can choose to make the repository public or private. Repositories in organizations that use GitHub Enterprise Cloud and are owned by an enterprise account can also be created with internal visibility.
It is only possible with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. I contacted GitHub support and they replied back confirming this. They stated "You can host a GitHub Pages site from a private repository, however all published sites are public."
Well, feeling silly to answer my own question but I found out the answer so maybe I will save a few minutes to the next person that runs into it.
The answer is very simply: in the manifest.xml file, create a remote tag with the fetch specifying ssh as the transport and "git" as the username. Here is an example:
<remote name="private_stuff" fetch="ssh://[email protected]/" />
Now use "private_stuff" as the remote field of the git trees you want to pull. For example:
<project path="xyz" name="username/xyz" remote="private_tuff" />
And init and sync the repo as usual.
It seems the proper method is to use a local_manifest.xml
in the ./repo
directory as per this link
see also the official repo documentation
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With