It's not the same without you
Join the community to find out what other Atlassian users are discussing, debating and creating.
I would like to push my repo to a public host but it contains private keys.
How can I remove these before pushing? Can SourceTree do this automatically? I.e. find and replace text on push?
I don't think Git/Hg or SourceTree provide a way to do this. The entire point of pushing and pulling is to keep repositories synchronized.
At this point, even deleting the private keys from your repo will be insufficient If you're pushing the entire repo, others will be able to look through the repository history to find them.
There is probably a complex Git/Hg command that can iterate through your history and delete all instances of a file, but you'd get more help with that in a larger forum, like StackOverflow or a Git/Hg mailing list.
Okay what about on committing or do you have another way of handling private keys with a public repo?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think most people would recommend to keep private keys outside the repo. You might consider a separate, private repo where you can store keys and any other non-public documentation.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...
Connect with like-minded Atlassian users at free events near you!
Find a groupConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.
Start an AUGYou're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.