Skip to content

Conversation

@tsepuri
Copy link

@tsepuri tsepuri commented May 21, 2020

GitHub requires you to have a public SSH key to push the files if the repository is added remotely, which may cause further errors. Instead, I created the README.md file using PyGithub and then cloned the repository into the folder using PyGit2.

I also fixed an issue where the files could not be accessed from any directory by storing the original location of the shell file and shifting most of the code into Python instead.

print("Succesfully created repository {}".format(folderName))
repo.create_file("README.md", "Initial commit","")
repoClone = pygit2.clone_repository(repo.git_url, path + str(folderName))
print(f"Succesfully created repository {folderName}")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is what for, I was going to create a pull request, why didn't @KalleHallden that .format just freaks me out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants