Clone your private GitHub repo in one single command

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hey guys if you are get user you know that now in order to access your github account you need your github account email and you need the developer token or the github access token to connect your github account sometimes when you try to connect any of your private repos and if you do not have this github account set up in your local machine you might have to fiddle with setting up your token using git config and other various commands and sometimes that process takes really very long if you are struggling with this problem this video is for you hello everyone my name is avkash and today i will be showing you just one line command to access your private repo directory from your local machine command line in this command you are going to use your github access token your github account name and your private repo name that's all you really needed and if the github access token has write access then not only you can clone this private repo locally but also you can immediately make changes to your code and you can push it so that's all will be done just using one single line command so let's get started here i'm already logged in to my github account and i will be creating a private repo and i will call it personal code this is my private repo i will call it private i will just add the readme to it and i will create this repo and this time i will add a new file to it and i will just call it zero.txt and i will just store some is here say so now we have some content in our repo so here is the credentials for our private repo and now i would like to clone this repo to my local machine so i will be using the https method select the url and let's open the command line this folder is empty so we will do git clone here is our http based access to this newly created private repo and as you could see here that this repo is asking for username i will give my username dot com is looking for password where i need to provide the token for us to access this and even if i will provide the token it may not be giving us access so how you can connect to your github repo just using one single command and have your private repo cloned locally so to solve this problem we are going to use a one single command so let's have the access token to get the access token you need to access your github account go to settings in the developer setting you can create a limited access token at this personal access token so let's create the new access token i call it week weekly access token it's just for a week it has access to repo it can write so you have write access and no package delayed it also has access to just notifications and users so that's all minimum access you needed token is created let's copy this token and we can go back ramp now let's look into the command so here is the personal access token at github.com slash you need to provide your actual github account name not the email so i would call it it's a github account name that's to be more clear and then your repo name.get so this is our access token and then github.com here is my account name program here is my program and the repo name is personal code so we will take this url now git clone and this is the new url so here we have this is our github access token here is the account name and here is the private repo and let's run it and you will see that just in one line you could access your private repo and you could clone it here is our personal code is it vi 0 so we have added it get status hit add hit commit code get push and there you go so just using one line of command you can give access to your private repo to your local machine you can clone it and you can push your code if you have read access enabled for this token so that's all you really needed using this method you can connect to any private repo and you can clone it and you can start pushing your code just to validate we can look into the private repo and here we could validate that the code we have just updated from local machine and that is available that's all you really needed in order to connect your local machine with your github private repo in online command so that's all i had for you in this tutorial and i will be seeing you in my another tutorial that's all my friends if you have enjoyed our content please like it share it subscribe it and finally please remember be good and do good thank you
Info
Channel: 650 AI Lab
Views: 11,929
Rating: undefined out of 5
Keywords: GitHub, Access Token, Git clone, Git push, git commit, Developer tools, bitbucket
Id: CBBqcDpUNq4
Channel Id: undefined
Length: 7min 4sec (424 seconds)
Published: Sun Feb 27 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.