1

I have an xml file that contains my API keys and I want to keep that separate from my Github repo, as it should be. However, is there any harm in including my local path in the repo or is there a better way of doing it?

public static string KeysXml = @"LOCAL_PATH_TO_Keys.xml";
Adil B
  • 14,635
  • 11
  • 60
  • 78

1 Answers1

1

Including absolute paths to files on your own machine in your repo:

  1. Does add more steps for newcomers to get your projects running on their own machines,
  2. Will interfere with any continuous integration tests you want to run on your releases.

There are a few acceptable ways to hide API keys without using local paths, as detailed in this question.

Adil B
  • 14,635
  • 11
  • 60
  • 78
  • 1
    Thanks! I knew it was probably bad practice to include a local path, but I wasn't aware of using environment variables as a solution to the problem. Thanks again! – Blaine Harris Feb 07 '19 at 20:08