andsens / homeshick

git dotfiles synchronizer written in bash
MIT License
2.11k stars 145 forks source link

Clone command should use git@github as the remote origin #189

Closed binarykitchen closed 5 years ago

binarykitchen commented 5 years ago

Currently it creates something like

remote.origin.url=https://github.com/abc/dotfiles.git

when cloned using $HOME/.homesick/repos/homeshick/bin/homeshick clone abc/dotfiles

which forces me to enter github username and password every time. Don't want to. Already have my ssh keys there.

Meaning I ll have to manually modify the auto generated git config file to

remote.origin.url=git@github.abc/dotfiles.git

A bit painful to do so on every machine. Can't this be a parameter of the clone command?

haraldkoch commented 5 years ago

Do you have your dotfiles in a private repo?

In my experience with public repos, the opposite is true; when cloning or pulling, I only get prompted for a username/password if I use the SSH URL.

andsens commented 5 years ago

The github shorthand is meant for cloning public repos, like e.g. robbyrussell/oh-my-zsh where you don't need push access. If you need to clone a private repo use homeshick clone git@github.com....

binarykitchen commented 5 years ago

@haraldkoch yes my dotfiles are in a private repo

do you think you can add this to the readme that the homeshick clone git@github.com.... syntax is possible too for private repos?

andsens commented 5 years ago

Done.