Reply
LDevi2017
Frequent Visitor

How to connect GitHub private repositories with Power BI

Hello,

 

I am trying to connect GitHub private repository with Power BI desktop. When I try to pass the Web API key, then I am getting below error. 

LDevi2017_0-1719899488615.png

 

 

That API Key is generated from GitHub personal access tokens

LDevi2017_1-1719899198915.png

Using same key I can generate JSON file from Postman, it's working fine.

Can any one help me on this to connect GitHub private repository with Power BI desktop

 

Thanks in advance

2 ACCEPTED SOLUTIONS

Hi @LDevi2017 

You can try the following solutions.

1.Connect Power BI to Private GitHub Repo — Smoother Consulting

Put your useraccount of the github to the username, then put the API key to the password.

2.You can try the following code.

let

    apiUrl = "my_api_url",

    token="my_api_key",

    options = [Headers=[#"Authorization"="Bearer " & token ]],

    result = Json.Document(Web.Contents(apiUrl , options))

in

    #"result"

You can also refer to the following link.

Solved: A web API key can only be specified when a web API... - Microsoft Fabric Community

rest - A web API key can only be specified when a web API key name is provided - Stack Overflow

 

Best Regards!

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

Hi @LDevi2017 ,

Thanks for your quick reply, you can try to refresh the datasource,

vxinruzhumsft_0-1720427539967.png

 

 

 

Best Regards!

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
LDevi2017
Frequent Visitor

I have connected using web option  and selected basic user name as API Key

LDevi2017_0-1719984404722.png

But after entered into power query result as below

LDevi2017_1-1719984520200.png

Actually JSON file need to load from this link. Can we able to convert this to table.

LDevi2017_2-1719984757818.png

Can I get any help

Hi @LDevi2017 

You can try the following solutions.

1.Connect Power BI to Private GitHub Repo — Smoother Consulting

Put your useraccount of the github to the username, then put the API key to the password.

2.You can try the following code.

let

    apiUrl = "my_api_url",

    token="my_api_key",

    options = [Headers=[#"Authorization"="Bearer " & token ]],

    result = Json.Document(Web.Contents(apiUrl , options))

in

    #"result"

You can also refer to the following link.

Solved: A web API key can only be specified when a web API... - Microsoft Fabric Community

rest - A web API key can only be specified when a web API key name is provided - Stack Overflow

 

Best Regards!

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Thanks for your reply.

When I try to connect with Power BI desktop, till the repo it's reading.

i.e https://api.github.com/repos/owner/repo

But it's not reading till joson file and I can see blank result.

LDevi2017_0-1720426362159.png

 

Can you suggest me where I can check it exactly.

Hi @LDevi2017 ,

Thanks for your quick reply, you can try to refresh the datasource,

vxinruzhumsft_0-1720427539967.png

 

 

 

Best Regards!

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Yolo Zhu,

 

I got the result on power query on yesterday once and again it shows blank result.

Can you suggest me what would be the reason and how can we solve.

 

Thanks,

Lakshmi

Hi Yolo Zhu,

 

Thank you very much. It's working perfectly.

 

Thanks,

Lakshmi 

avatar user

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)