Github copyq5/30/2023 ![]() ![]() They can use it in closed source commercial software. It allows others to do almost anything with your code. Many mistakenly think no license means public domain which it does not. People fork and clone public repos all the time including those without licenses stated. If this is your intention then it should probably be a private repository. Whether you have explicitly stated this anywhere or not, this case is essentially a copyright with all rights reserved. Technically, if you have not specified a license, and have also not explicitly put the work into the public domain, then nobody but you can legally make a copy. Here's a bit of an answer for all 3 cases. Some of your repos have no license specified, some have the MIT license, and 1 the Apache license. Your post doesn't indicate, but since you have a relatively small number if GitHub repositories I took a look. It turns out that a simple `!cd /drive/My\ Drive/repos/SomeFolder` is not enough, because, for some reason that I didn’t take the time to google, the command has to be executed with magic, meaning that the command needs to use a percentage sign instead of an exclamation mark.The answer to your question depends on the license that you applied to your work. Changing Directoryīoth commands require a bit more than that to which you may be used to, even if like in my case, you had lightly used Python notebooks before. Sure you can cd into any folder now, right? Wrong, sort of. Cloning the repositoryĬloning the repo is a simple `git clone` away, right? Wrong, sort of. I’ve used commands on a Python notebook, I’ve also used magic commands on a Python notebook, I would not have imagined that a simple cd command would require magic to function, but apparently, on Python notebooks -or at least on Google Colab- it does.Īnd remember when I mentioned that Colab never asked for my GitHub credentials? This means that we have two things to solve when cloning our repository, even after we have Drive mounted inside of the “file system” inside of Google Colab. However, as I said, it is not as straight forward as you may imagine at the beginning. ![]() So this is great, that means I can change directory into my repos folder that I have over on drive, create a new folder, and clone my repo there. Of course, you can choose your own path where to mount Drive, but once you have, you can access all your files, as shown here. You then log in with your Google account, copy the provided key, and paste it back into colab: The process is simple, just execute this next command on any Colab notebook and follow the link that it will display in the output. Of course, you could choose to clone to that folder form an actual computer, with access to the terminal, and later on, go on to open the files on Colab (or anywhere else), but as I mentioned, I found myself without a computer (although, what’s a computer right?) and I had to figure out how to clone my repos using my iPad.įor this, you will have to start by mounting Google Drive into Google Colab, which already has git installed so at least that is covered. However, if you clone a GitHub repo to your Drive folder, you can access it anytime. Accessing Google Drive from Google Colabīecause by default the directories that you can access from Colab are not the ones on your Drive, it would make it very hard (if at all possible) to access those files later. But let me explain how I solved both issues and am now able to clone any repo to my Google Drive, edit my ipynb files from Colab and push everything back to GitHub even from my iPad Pro. And look, I’m sure that you could solve the credentials problem in some other way, but I was in a hurry, and so the solution may not have been the best or more secure. And also, if I tried to push back to the remote, that failed because Colab never prompted me to enter my GitHub credentials. I had managed to clone my repo, as you would, to the content folder that is enabled for your Google Colab notebook, I could see my ipynb files listed right there, and yet I was unable to open them. Also, when it comes time to push everything back to the remote, it simply will fail (no way to enter the credentials). This means that if you were to directly clone a GitHub repo, it will end up in some directory that you won’t easily find from outside Colab (if at all). The reason why cloning a GitHub repository with Google Colab is not as straight forward as one may think is twofold:īy default, you don’t have an easily accessible File System ![]()
0 Comments
Leave a Reply. |