Hi Guys,
I was facing a problem when i was working on a project on github. The pull and push git commands were asking me my github username and password when i pushed or pulled the branch. Following are the steps :
Step 1 : Remove the already added origin if any by using this command
>git remote rm origin
Step 2 : Now we will add an origin with username and password, This will get stored in the git file and won't ask the username and password again.
>git remote add origin https://username:password@github.com/organizationname/repositorypath
where username is your github user name and password is the password of your github user. In case you cannot find the organizationname and repositorypath, You can find this by copying the https clone URL of the repository. i.e incase your your URL is "https://github.com/riteshtandon23/MyCodio.git" having username as "test" and password as "test123" then your git command will be
>git remote add origin https://test:test123@github.com/riteshtandon23/MyCodio.git
Step 3 : Give a command to pull the branch on local
>git pull origin master
It won't ask you any login or password same will happen with the push command.
> git push origin master
Hope it helped you.a
Thanks
Ritesh
I was facing a problem when i was working on a project on github. The pull and push git commands were asking me my github username and password when i pushed or pulled the branch. Following are the steps :
Step 1 : Remove the already added origin if any by using this command
>git remote rm origin
Step 2 : Now we will add an origin with username and password, This will get stored in the git file and won't ask the username and password again.
>git remote add origin https://username:password@github.com/organizationname/repositorypath
where username is your github user name and password is the password of your github user. In case you cannot find the organizationname and repositorypath, You can find this by copying the https clone URL of the repository. i.e incase your your URL is "https://github.com/riteshtandon23/MyCodio.git" having username as "test" and password as "test123" then your git command will be
>git remote add origin https://test:test123@github.com/riteshtandon23/MyCodio.git
Step 3 : Give a command to pull the branch on local
>git pull origin master
It won't ask you any login or password same will happen with the push command.
> git push origin master
Hope it helped you.a
Thanks
Ritesh
No comments:
Post a Comment
Comments are welcome, Please join me on my Linked In account
http://in.linkedin.com/pub/ritesh-tandon/21/644/33b