Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I have the project for work that requires me to send e-mails to people using our work mail server. The server doesn't require authentication. Part of my project is using a Java-Helper I'm developing on GitHub. I don't know if I completely understand how it all works, but I'm guessing it would be a bad idea to have the server information available on GitHub for the world to see. Is this correct?

After thought: I'm not going to put it in the Java-Helper because that wouldn't be helpful for anyone but me. but I'm still curious to know the answer to this question :) Thanks!

share|improve this question
    
Figure out a generic way to read a configuration file in your applications and put the information there. –  user1249 Jun 10 '12 at 10:13

2 Answers 2

up vote 5 down vote accepted

I know of scrapers that just crawl around looking for this kind of information. I'd avoid it as much as possible. Even if it's secured and people couldn't use it... it doesn't sound like necessary information to have published.

share|improve this answer

Of course, that's a bad idea. This is not just good security, but this will also make your project potentially more useful to others.

Ideally, you should be externalizing all of that information into a configuration file that you tell git to ignore and then you should add a well commented blank configuration file that others downloading your project can tailor to their needs.

Bonus points if you mention the need to modify that file in your README file and if you centralize all of those environment-specific constants into just one file. Others are less likely to make a mistake if they just have to modify a single file.

Then, don't forget to double-check your work. From a different computer, from home or elsewhere, try to see how easy it is to download and rebuild your project from scratch as if it were the first time you ran across it on GitHub.

share|improve this answer
    
Good answer! This is actually what I ended up doing. I have a properties file that git ignores. I should probably add a note in the READ-ME though. Maybe if I ever get anyone who's interested in forking it I'll put more effort into that though... –  kentcdodds Jun 10 '12 at 3:15
    
If you need to version control the configuration file, you can create a private branch in your repository that doesn't get pushed to github. You do all of the development in the public branch, and merge it into the private branch for deployment. –  Ken Bloom Jun 10 '12 at 3:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.