I am doing a machine learning project with the Jetson Nano, which is running in headless mode. All of the programming is done in Python. At this point I have a Samba server running on my Nano, so when I have to write/edit code, I connect to the Samba server from my laptop, open the code files, and write/edit code locally in the IDE on my laptop, save it, and when I need to run it, I do it via command line through an SSH connection. This works well so far, but I was thinking if there maybe is a better way to do it? I was looking into, if using GitHub for this would be an advantage, as you will also have the code stored in the cloud (as well as all the other neat features of Github), as opposed to only on the Nano, but I don’t have much experience with using GitHub, so I am not sure if it would be an advantage to use it this way. In any case, I would prefer not to edit code on the Nano through SSH or VNC, and connecting screen and keyboard is not possible in this setup.
I think the way you’re doing developing now is good. I think the way to use git is to first make your edits on the machine you’re developing on, then at the end of the session or whenever you’d like you can “push” the most recent changes to github. Github recently changed their method of pushing from a password based way to using ssh keys. So it takes a bit of setup to get it working. I’ve provided some links below you can follow. I’ve done it myself just now to make sure it works. I avoided setting it up now but this post reminded me I should really get that working. Before I was doing it in a tedious manner.
For the first link, follow “About SSH key generation” and “Adding your SSH key to the ssh-agent” instructions. The steps in short are to create a ssh key on your jetson, then add that key to your github user account. That should be all there is to it for authentication.
Now for the second link: you also need to configure the git folder (local repository) from where you will be pushing from. The second link provides a way to do it. But when you set the remote url (line 7), be sure to use the ssh link given on the github website. That means you need to go on the github website and create the repository on there. There you can get the link, it should be something like “email@example.com:username/repository_name”. There probably is a better way to do it but that is what I’ve got working so far.
I’d recommend googling some of the commands so you know what they do before you add the code to the repository.
github has some commands to manage between branches and to push/pull from your repository. I’d recommend getting familiar with branches, pushing, and pulling repositories.
I think these steps should be sufficient, those were the two main links I followed to get it working.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.