Can you add a setting so that other users cannot access or download the source code from releases or anywhere else? #197924
-
🏷️ Discussion TypeQuestion BodyI want users to be able to download and use my application, but I do not want them to access, download, or redistribute the source code. Is there a GitHub setting that prevents source code downloads from releases or public repositories? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
Honestly, there’s no GitHub switch that lets you say “people can use my repo but can’t get the source code.” If the repository is public, GitHub is basically designed around the idea that everything in it can be cloned, downloaded, or viewed. Even if you try to hide things in releases, the source code itself is still fully accessible from the repo. What people sometimes do in your situation is change the approach a bit rather than trying to “lock” GitHub. For example, instead of giving users your actual source code, you keep the repository private and only distribute compiled builds through GitHub Releases or another platform. That way, users download and run your app, but they never see the code because it simply isn’t exposed. The other common move is separating your logic. Anything sensitive or valuable goes on a backend server you control, and the app they download is just a frontend that talks to your API. That way, even if someone inspects or reverse engineers the app, the real “brain” is still yours and not sitting on their machine. Also, just to be real with you, even outside GitHub, there’s no perfect way to completely prevent code extraction if someone is determined. People can decompile, reverse engineer, or inspect compiled apps. The goal in practice is usually “make it hard enough and move the important stuff server-side,” not “make it impossible.” So yeah, short answer: GitHub doesn’t have a setting for what you’re trying to do with a public repo. The workaround is either keep the repo private and distribute builds, or redesign so the valuable parts aren’t shipped to users in the first place. |
Beta Was this translation helpful? Give feedback.
Honestly, there’s no GitHub switch that lets you say “people can use my repo but can’t get the source code.” If the repository is public, GitHub is basically designed around the idea that everything in it can be cloned, downloaded, or viewed. Even if you try to hide things in releases, the source code itself is still fully accessible from the repo.
What people sometimes do in your situation is change the approach a bit rather than trying to “lock” GitHub. For example, instead of giving users your actual source code, you keep the repository private and only distribute compiled builds through GitHub Releases or another platform. That way, users download and run your app, but they never see …