1 attempt to fix git Fatal: Could not read Username for "https://github.com"

This commit is contained in:
Churikova Tetiana 2018-04-18 15:09:16 +03:00
parent 68637f0763
commit 61c965840f
No known key found for this signature in database
GPG Key ID: 0D4EA7B33B47E6D8
1 changed files with 3 additions and 1 deletions

View File

@ -282,7 +282,9 @@ class GithubPage(BasePageObject):
os.mkdir(repo_folder)
os.chdir(repo_folder)
self.local_repo_path = os.getcwd()
fork = 'https://github.com/%s/%s.git' % (username, repo_name)
fork = 'https://%s:%s@github.com/%s/%s.git' % (test_data.config['DEV']['gh_login'],
test_data.config['DEV']['gh_password'], username, repo_name)
logging.info(('Cloning from %s to %s' % (fork, self.local_repo_path)))
repo = git.Repo.clone_from(fork, self.local_repo_path)
logging.info(('Successefully cloned to: %s' % self.local_repo_path))