Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

git remote set-url username password

# add remote URL with out user name or password
git remote add origin https://gitlab.example.com/group1/project1.git

# if not able to change origin url use the below
git remote set-url origin https://gitlab.example.com/group1/project1.git

# it will prompt for credentials on first login and should not afterwards.
# store option stores credentials same in plain text in ~/.git-credentials
git config credential.helper store
# list all the settings
git config --list
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #git #remote #username #password
ADD COMMENT
Topic
Name
8+2 =