简体   繁体   English

如何将存储库克隆到本地机器上?

[英]How to clone repository onto a local machine?

Cloning repository克隆库

I need this for scraping TikTok by using TikTokApi created by David Teather.我需要这个用的TikTok TikTokApi大卫Teather创建。

On his guideline, I have to clone repository using Docker and here are the script根据他的指导方针,我必须使用 Docker 克隆存储库,这里是脚本

docker build . -t tiktokapi:latest
docker run -v TikTokApi --rm tiktokapi:latest python3 your_script.py

I had install :我有安装:

  • Docker码头工人
  • WSL. WSL。
  • Git吉特
  • Visual Studio Code视觉工作室代码
  • Visual Studio Code Remote Containers Extension Visual Studio Code 远程容器扩展

After all, what should I do?毕竟,我该怎么办? I am so confused to clone the repository.我很困惑克隆存储库。 However, I am not sure with the installation of Visual Studio Code Remote Containers Extension.但是,我不确定是否安装了 Visual Studio Code 远程容器扩展。

Thank you in advance for your guide.预先感谢您的指导。

I think you are missleading two things:我认为你误导了两件事:

  • docker
  • git
  1. First you need to get this repo using git command THEN you will be able to use the docker command.首先,您需要使用git命令获取此存储库,然后您将能够使用docker命令。 Git will allow you to "clone" a repository. Git将允许您“克隆”存储库。 From the terminal within visual studio code or using one of the extension please do : git clone <the URL of the repo> .从 Visual Studio 代码中的终端或使用扩展名之一,请执行以下操作: git clone <the URL of the repo> ie : git clone git@github.com:whatever or git clone https://github.com:whatever即: git clone git@github.com:whatevergit clone https://github.com:whatever
  2. Second after that you will be able to use the docker build .其次,您将能够使用docker build . command.命令。 please run the docker command from the root of the project.请从项目的根目录运行 docker 命令。

Side note :边注 :

As the project owner wrote on the github main page :正如项目所有者在 github 主页上所写:

Clone this repository onto a local machine then run the following commands.将此存储库克隆到本地计算机上,然后运行以下命令。

 docker run -v TikTokApi --rm tiktokapi:latest python3 your_script.py

that is why you need first to clone the repo这就是为什么您首先需要克隆 repo

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM