Commit 5ded25e1 authored by Sebastien Robin's avatar Sebastien Robin

it should not be mandatory to provide username and password when

we use public repository
parent 4af86f5d
...@@ -121,12 +121,13 @@ class Recipe(BaseSlapRecipe): ...@@ -121,12 +121,13 @@ class Recipe(BaseSlapRecipe):
home_directory = os.path.join(*os.path.split(self.bin_directory)[0:-1]) home_directory = os.path.join(*os.path.split(self.bin_directory)[0:-1])
print "home_directory : %r" % home_directory print "home_directory : %r" % home_directory
git_dict.setdefault("git_server_name", "git.erp5.org") git_dict.setdefault("git_server_name", "git.erp5.org")
netrc_file = open(os.path.join(home_directory, '.netrc'), 'w') if git_dict.get('vcs_username', None) is not None:
netrc_file.write(""" netrc_file = open(os.path.join(home_directory, '.netrc'), 'w')
machine %(git_server_name)s netrc_file.write("""
login %(vcs_username)s machine %(git_server_name)s
password %(vcs_password)s""" % git_dict) login %(vcs_username)s
netrc_file.close() password %(vcs_password)s""" % git_dict)
netrc_file.close()
def installLocalRepository(self): def installLocalRepository(self):
if self.parameter_dict.get('vcs_repository').endswith('git'): if self.parameter_dict.get('vcs_repository').endswith('git'):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment