Skip to content
Sign upLog in
← Back to Community

How to run a repo cloned from GitHub

Profile icon
Drallas

I cloned a repo from Github but it won't run.

What am i doing wrong? The documentation regarding the .replit file is not helpful at all.

Deleting .replit and running the main.py directly works fine, but I'm trying to understand the why and how of the .replit file.

Answered by Coder100 [earned 5 cycles]
View Answer
Voters
Profile icon
Drallas
Comments
hotnewtop
Profile icon
Coder100

The .replit file specifies what should happen when you click the run button.

image

This right here is set up incorrectly. The run command is a bash command.

Correct setup:

run="python3 ./main.py"

The language is optional!

Profile icon
Drallas

@Coder100

Tnx that works, having the "language = "python3" part is confusing since i assumed that it was inserted into the run at line 2.

Profile icon
Coder100

yeah it is a bit confusing :(

Mark as correct answer?

@Drallas

Profile icon
PattanAhmed

@Drallas
Hi,
You need to specify what is gonna happen when you or someone clicks the run button...
The Language that you have given is optional and that can be removed too...
Anyways, here add this code:-

run = "python3 ./main.py"

That's it
Thanks!

Hope this helps

Profile icon
[deleted]

How to clone a folder from github?
From your repository page on GitHub, click the green button labeled Clone or download, and in the “Clone with HTTPs” section, copy the URL for your repository. Next, on your local machine, open your bash shell and change your current working directory to the location where you would like to clone your repository.