git - gitlab - push using https, specifying username & password -
i trying push newly created repository gitlab. here's did:
create project in gitlab. example url: https://gitlab.example.com/examples/project1.git
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:
Comments
Post a Comment