↓ Skip to main content

Github

How to mirror Github and Bitbucket repositories

Mirroring large number of GitHub or Bitbucket repositories # Use case: I want to create local clone of a large number of repositories from an organization in GitHub / Bitbucket. Assumptions # user has SSH key registered with the GH / BB - can clone using ssh protocol user has successfully cloned at least one repo from command line before (the /etc/hosts contains host entries for BB and GH) user has modern version of Python 3 installed (3.6 or better) user has local installation of a reasonably modern Git Steps # First I use the ./bb-repo-links.sh and ./gh-repo-links.sh to generate list of repositories. See these blog articles: How to list repositories in Bitbucket and How to list repositories in github

How to list Github repositories and users

How to list repositories in GitHub # Use Case: I want to maintain repositories in an organization in GitHub. To make sure I do not miss newly added ones, I want to use API access to retrieve the list of repositories in the organization. Setup # GitHub requires a token to access the API. This token is stored in an environment variable github_token and can be generated in the user profile section - settings - developer settings.

Building Hugo as well on GitLab pages

·496 words·3 mins
Parallel building challenges # Unlike Github, Gitlab considers Hugo blogs first class citizens and does not impose any restrictions on repo naming. I had 3 challenges to overcome related to co-existence of GH and GL versions: I need to use same repo for both GH and GL the submodule link for public does not work on GL the site root is different - I have no custom domain forward for GitLab Using same repo # To separate the GH and GL, I have added 2 remotes to repo and special branch gitlab-pages.

GitHub identity mixup

·80 words·1 min
After I created the ThinkWrap GitHub account and uploaded the public key, this key got somehow bound to GitHub identity ‘madamy’ I had to add user madamy to my public GitHub repo - where I keep the dot-files - https://github.com/radegast/dotvim This may be an issue for people that have their own private accounts - the key management is the key. This article is useful: http://sealedabstract.com/code/github-ssh-with-multiple-identities-the-slightly-more-definitive-guide/ http://net.tutsplus.com/tutorials/tools-and-tips/how-to-work-with-github-and-multiple-accounts/ Alternative # Use https for forking , instead read/write ssh. No keys involved there