How to search using GitHub API in private organizations -


i have private organization github (enterprise) repository, e.g. github.mycompany.com.

i want search strings in code using github api. how search in mycompany-specific github repositories?

i tried query below , received 404:

curl -i -h "authorization: token <token>" https://github.mycompany.com/api/v3/search/code?q=class

it seems authenticating fine, since tried curl -u <username> and

  • if give wrong password, authentication error.
  • if give right password, goes through, returns 404 search query.

currently, search api still in preview on github enterprise. result, need specify special media type in accept header things working.

give try:

curl -i -h "accept: application/vnd.github.preview+json" -h "authorization: token <token>" https://github.mycompany.com/api/v3/search/code?q=class


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

android - Keyboard hides my half of edit-text and button below it even in scroll view -

css - Make div keyboard-scrollable in jQuery Mobile? -