Hello @Chris Fauskanger
Here are some steps you can take:
Create a new private repository: Since you cannot change the visibility of a forked repository directly, you can create a new private repository on GitHub.
Clone the forked repository: Clone the forked repository to your local machine. You can do this by using the command git clone https://github.com/username/repository.git
.
Push to the new repository: Push the cloned content to your new private repository. First, navigate to your cloned repository on your local machine. Then, remove the existing origin with the command git remote remove origin
. Add the new origin pointing to your private repository with the command git remote add origin https://github.com/username/new-repository.git
. Finally, push the content to the new repository with the command git push -u origin master
.
Update Azure: Update your Azure Web App to point to this new private repository instead of the old one.
Remove sensitive data: Since your connection string was previously exposed, it’s recommended to change it to ensure the security of your database. After changing it, update the connection string in your Azure Web App settings.
Use Secrets for sensitive data: For better security, consider using Secrets in GitHub or Azure Key Vault for storing sensitive data like connection strings. This way, the sensitive data is not exposed in your code.
Remember, once sensitive data is committed to a repository, it might still be accessible in the commit history even after you change the visibility or remove the file. Therefore, it’s crucial to change any credentials that were exposed.
If this information provided here helps solve your issue, please tag this as answered, so it helps further community readers, who may have similar questions.