github - Changing git setup to allow multiple users to push/commit files -
i've got beaglebone set while (when first learning git) ssh key specific github account. account our company's main account. many people work directly on, , push github directly from, beaglebone. i'd change settings whenever wants commit or push github queried username.
my recent commit , push looks this... you'll see have no option enter username, password our company's main account.
root@beaglebone:/var/lib/cloud9/pypos# git commit -a -m "class restructured , passing new updated test script" [class_restructure 1db2e33] class restructured , passing new updated test script 2 files changed, 14 insertions(+), 10 deletions(-) root@beaglebone:/var/lib/cloud9/pypos# git push origin class_restructure enter passphrase key '/home/root/.ssh/id_rsa': counting objects: 7, done. compressing objects: 100% (4/4), done. writing objects: 100% (4/4), 531 bytes, done. total 4 (delta 3), reused 0 (delta 0) git@github.com:farmdesign/pypos.git 83831a8..1db2e33 class_restructure -> class_restructure root@beaglebone:/var/lib/cloud9/pypos#
github supports different protocols communicating repositories have hosted there. if use ssh protocol, git asks password unlock key stored in .ssh tied ability push github repo (anyone access key can push repo, providing password accessing key needed). however, if use http, asked github username , password.
so, go github webpage of repository , notice http, ssh , git toggle buttons next url of repository (near top of page). play around button see how url of repo changes -- these different urls @ repo accessible depending on protocol using. now, click on "http" , copy url clipboard.
now, go terminal , cd directory of local clone of repo. now, use git remote command change url @ git communicating github repo:
git remote set-url origin the_url_that_you_just_copied_to_clipboard
now when try git push, git use http protocol require specify username , password.
Comments
Post a Comment