Raw File URL Of Private Repository

When I click on the Raw file Button on a file on my private Repo, The Download link is of the form

https://raw.githubusercontent.com/<user>/<repo>/master/<file>?token=<token>

This link works also when I am not logged in, There is a token attached to the URL.

I wanted to know if that token is supposed to be kept secret or is it safe to share the link in case I want to share a file from private Repository?

2 Likes

Hi @theabbie o/

I went ahead and re-categorized this post, but if you feel there is an API action that you’re trying to take with this raw URL, then please let me know and we can switch back :bow:

Though for your question:

I wanted to know if that token is supposed to be kept secret or is it safe to share the link in case I want to share a file from private Repository?

Yes! There’s really no reason why this would be unsafe to share, AFAIK. When we look at this post:

…we can see:

The token will expire in 7 days.

So you won’t be able to keep that URL permanently, as it will change.

Please let us know if this is helpful and if you have any remaining questions or concerns!

3 Likes

Awesome, Thank you for clarifying my doubt

2 Likes