Putting that info in other file, for instance an YML, and referencing it on your Rakefile? The YML would be on you .gitignore to avoid committing personal information.
Example of .YML file:
app:
codesign_certificate: "iPhone Developer: Name Goes Here (12SELC3456)"
EDIT
For more info how to read an YML file: How do I parse a YAML file