Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change setup of origin to comply with github push requests #43

Open
elmar-hinz opened this issue Feb 16, 2015 · 2 comments
Open

Change setup of origin to comply with github push requests #43

elmar-hinz opened this issue Feb 16, 2015 · 2 comments

Comments

@elmar-hinz
Copy link

The current setting of origin in bin/dotfiles line 288 is:

git clone --recursive git://github.com/${github_user:-cowboy}/dotfiles.git $DOTFILES

Yesterday I ran into an issue with this. I could not push to github.com with the generated .git/config.

The suggested form for cloning is:

git clone [email protected]:cowboy/dotfiles.git

This should setup .git/config right.

Just want to announce. Will send a pull request once I got some routine with github.com, and dived into this a little deeper.

regards

from Elmar to Alman

P.S.: Yes, I tried with my own fork of the repo.

@cowboy
Copy link
Owner

cowboy commented Feb 17, 2015

This sounds useful. Send a PR and I'll merge it. Thanks!

@elmar-hinz
Copy link
Author

Just for documentation. This is the error after installing with the current version.

fatal: remote error: 
  You can't push to git://github.com/elmar-hinz/dotfiles.git
  Use https://github.com/elmar-hinz/dotfiles.git

At least it makes a different suggestion than I did above.

The resulting .git/config

[core]
    repositoryformatversion = 0
    filemode = true
    bare = false
    logallrefupdates = true        
    ignorecase = true
    precomposeunicode = false
[remote "origin"]
    url = git://github.com/elmar-hinz/dotfiles.git
    fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
    remote = origin
    merge = refs/heads/master
[submodule "link/.vim/bundle/Vundle.vim"]
    url = https://github.com/gmarik/Vundle.vim.git

Following the suggestion of the error msg and setting HTTPS makes me enter me password:

url = https://github.com/elmar-hinz/dotfiles.git

Using the git protocol I can login without password prompt by using the ssh keys.

url = [email protected]:elmar-hinz/dotfiles.git

However the second solution requires that the user put his public key on github. But I think it also prompts for the password if the user didn't. So this should be the preferred solution I think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants