git - gitlab - push using https, specifying username & password -


i trying push newly created repository gitlab. here's did:

  1. create project in gitlab. example url: https://gitlab.example.com/examples/project1.git

  2. initiated local bare repo:

    cd ~/projects git init --bare ./project1.git cd project1.git 

question:

next step push of local repo gitlab. want specify username , password using https. how change following it?

git remote add origin https://gitlab.example.com:group1/project1.git git push --all git push --tags 

when created repo in gitlab, deafault provide clone git repo using 2 protocols, ssh , https. in https prompt user credential every time pull or push.

i prefer use ssh. in ssh can push lot of files repo. in https have size restriction. perhaps want push 4gb files repo.

follow these steps set ssh remote:

git remote rm https://gitlab.example.com:group1/project1.git  git remote set-url origin ssh://user@host:1234/srv/git/example 

useful information:

worth reading setting git remote:

https://help.github.com/articles/changing-a-remote-s-url/


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -