0

I am using the GUT API to get the files list. I am using the GIT API Get Contents

This is the URL:

https://github.com/repos/gitster/git/contents/git

where gister is owner git is repository git is path

But I get error as below:

{
  "error": "Not Found"
}

Please help me how to get the files list using GIT API.

1 Answer 1

1

You might need to change the url from https://github.com/repos/gitster/git/contents/git to http://api.github.com/repos/gitster/git/contents/ as given by Github's API documentation as you have mentioned

GET /repos/:owner/:repo/contents/:path

Example:

$.ajax({
    url : 'http://api.github.com/repos/gitster/git/contents/',
    method : 'GET',
    success : function(response) {
        console.log(response);
    }
});

Hope this helps for your case

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.