def fetch_public_key(repo):
 keyurl = 'https://api.travis-ci.org/repos/{0}/key'.format(repo)
 data = json.loads(urlopen(keyurl).read().decode())
 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']

def fetch_public_key ( repo ) : keyurl = 'https://api.travis-ci.org/repos/{0}/key' . format ( repo ) data = json . loads ( urlopen ( keyurl ) . read ( ) . decode ( ) ) 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' ]
download rsa public key travis will use for this repo .