diff --git a/autogpt/commands/git_operations.py b/autogpt/commands/git_operations.py index 3483474b..3ff35cf3 100644 --- a/autogpt/commands/git_operations.py +++ b/autogpt/commands/git_operations.py @@ -16,5 +16,8 @@ def clone_repository(repo_url: str, clone_path: str) -> str: str: The result of the clone operation""" split_url = repo_url.split("//") auth_repo_url = f"//{CFG.github_username}:{CFG.github_api_key}@".join(split_url) - git.Repo.clone_from(auth_repo_url, clone_path) - return f"""Cloned {repo_url} to {clone_path}""" + try: + git.Repo.clone_from(auth_repo_url, clone_path) + return f"""Cloned {repo_url} to {clone_path}""" + except Exception as e: + return f"Error: {str(e)}"