# Cloning a git repository into your board connected to computer

**URL:** <https://discuss.pynq.io/t/cloning-a-git-repository-into-your-board-connected-to-computer/3422>\
**Category:** Learn\
**Created:** [December 13, 2021, 12:00am UTC](https://discuss.pynq.io/t/cloning-a-git-repository-into-your-board-connected-to-computer/3422 "2021-12-13T00:00:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ghani](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/ghani/32/2540_2.png) [@Ghani](https://discuss.pynq.io/u/Ghani)\
**Post date:** [December 13, 2021, 12:00am UTC](https://discuss.pynq.io/t/cloning-a-git-repository-into-your-board-connected-to-computer/3422/1 "2021-12-13T00:00:57Z")

</div>

- While connecting your board to a network router would make it easy to clone git repositories, sometimes you are limited to connecting your board only to your PC, this may create some difficulties when you would like to get new files and repo added to your pynq environment, to overcome this challenge we would be taking an approach of cloning the needed repository into our PC and then transfer the repo to the board via ssh with the `SCP` command

- First of all, you can connect to your board via ssh by running the following command `ssh username@hostname` example “`ssh xilinx@192.168.2.99`”

- The hostname may vary so check the one associated with your board, the default username is xilinx, after running that you will be asked to enter your password and the default one is xilinx

- Now after cloning the needed repo to your local system, for example, you may want to add it to our jupyter\_notebook folder located on our board directory `/home/xilinx`, to perform this: on your local system open the terminal and run:  
`scp -r /path_to_the_folder_on_your_PC/ xilinx\@192.168.2.99:/home/xilinx/jupyter_notebooks`

- Enter your password and then enjoy running your new codes!

**A small tip:** to connect to your board via ssh easily give it a new short handly hostname, to do this:

- Navigate to your home directory with `cd` and create a directory called `.ssh` with `mkdir .ssh`
- Move to that new directory with `cd .ssh` then create a new file with the name `config` with `gedit config`
- Add the following lines to that file:  
Host the\_new\_name\_you\_like\_give\_to\_your\_host (ex: mypynq)  
HostName 192.168.2.99  
User xilinx
- save the file and connect to your board via ssh since now with `ssh mypynq`

---

<div class="post-metadata">

**Author:** ![cathalmccabe](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/cathalmccabe/32/3348_2.png) [@cathalmccabe](https://discuss.pynq.io/u/cathalmccabe)\
**Post date:** [December 13, 2021, 11:56am UTC](https://discuss.pynq.io/t/cloning-a-git-repository-into-your-board-connected-to-computer/3422/2 "2021-12-13T11:56:42Z")

</div>

If you use JupyterLab (available on PYNQ by browsing to {IP address of board}/lab then you can drag an drop files to upload.

You can also map the board as a network drive to access files:  
[https://pynq.readthedocs.io/en/v2.7.0/getting\_started/pynq\_sdcard\_getting\_started.html?highlight=samba#accessing-files-on-the-board](https://pynq.readthedocs.io/en/v2.7.0/getting_started/pynq_sdcard_getting_started.html?highlight=samba#accessing-files-on-the-board)

Cathal
