claudioc / jingo

Node.js based Wiki
MIT License
1.02k stars 184 forks source link

Access private Github repos #94

Closed lazydino closed 7 years ago

lazydino commented 9 years ago

I set up a private github repos for hosting wiki, but newly added collaborator of the repos still gets HTTP 403. Does Jingo support this use case? Can a selected group of Github users collaborate wiki over Jingo?

lazydino commented 9 years ago

It looks like if I make the repos public, it still does not work. After HTTP 403, I refresh the page , and it reports

failed to fetch user profile (status: 401 data: {"message":"Requires authentication","documentation_url":"https://developer.github.com/v3"})

It looks like only the github account that creates the github wiki repos and clone it on the Jingo server work?

Will try google to make sure that the provider login is ok...

lazydino commented 9 years ago

Google login works fine. Anyone tried github login?

claudioc commented 9 years ago

Hi @lazydino

Github authentication for Jingo, is only used to authenticate users on Jingo itself (so that unauthorised users cannot access the document stored on the local repository). How jingo accesses the private repos it up to the local configuration of git itself. For this reason you may use ssh keys.

I just checked the github authentication and it works with no problems.

concentrateddon commented 7 years ago

For future reference, if you desire to have jingo pull from a private GitHub.com repo:

  1. Create an SSH key on your server. Instructions at https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/.

  2. Add the SSH key to your GitHub account (which can access the private repo). https://help.github.com/articles/adding-a-new-ssh-key-to-your-github-account/

  3. Change to your repo folder.

  4. Run git remote add origin git@github.com:repouser/reponame to add the repo.

  5. Run an initial git pull origin master and git push origin master.

  6. Ensure origin is added as the repo in the jingo config YAML.

claudioc commented 7 years ago

@concentrateddon I added a page into the wiki with those instructions. Thanks!

https://github.com/claudioc/jingo/wiki/How-to-have-jingo-pull-from-a-private-GitHub.com-repo