Skip to content

Commit

Permalink
Fix Git commit error with missing email and name (#164)
Browse files Browse the repository at this point in the history
  • Loading branch information
pal03377 authored Oct 26, 2023
1 parent b50a3f9 commit 4c44036
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions athena/athena/helpers/programming/code_repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ def get_repository(url: str, authorization_secret: Optional[str] = None) -> Repo
repo_zip.extractall(cache_dir_path)
if not (cache_dir_path / ".git").exists():
repo = Repo.init(cache_dir_path, initial_branch='main')
# Config username and email to prevent Git errors
repo.config_writer().set_value("user", "name", "athena").release()
repo.config_writer().set_value("user", "email", "[email protected]").release()
repo.git.add(all=True, force=True)
repo.git.commit('-m', 'Initial commit')

Expand Down

0 comments on commit 4c44036

Please sign in to comment.