How does one find out one's own Repo ID?

If, like me, you were after the GitHub repository ID (as in - the number identifying the repo - not its name), then I found an easy way to do this via the metadata element on the main page of the repository on GitHub:

  1. View the page source (Right Click > View Page Source in Chrome or Firefox for example)
  2. Search the page source and look for octolytics-dimension-repository_id. You should find something that looks like:

    <meta content="123456789" name="octolytics-dimension-repository_id" />

In this example, the ID of the repository is 123456789.


When you say "repo ID", do you mean the URL of the repo on GitHub?

If that's what you're looking for, use git remote.

plankton:~/scraps $ git remote -v
origin  [email protected]:petdance/scraps.git (fetch)
origin  [email protected]:petdance/scraps.git (push)

If you have multiple remote repos feeding into your local repository, all of them will be listed there.


Here's a quick query you can run in console:

$("meta[name=octolytics-dimension-repository_id]").getAttribute('content')