code: def fetch_public_key(repo):
      
      keyurl = 'https://api.travis-ci.org/repos/{0}/key'.format(repo)
      data = json.loads(urlopen(keyurl).read())
      if 'key' not in data:
          errmsg = "Could not find public key for repo: {}.\n".format(repo)
          errmsg += "Have you already added your GitHub repo to Travis?"
          raise ValueError(errmsg)
      return data['key']
docs: Download RSA public key Travis will use for this repo.
  
      Travis API docs: http://docs.travis-ci.com/api/#repository-keys