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

Conflict with [remote "origin"] config in ~/.gitconfig #287

Open
pixelastic opened this issue May 2, 2016 · 1 comment
Open

Conflict with [remote "origin"] config in ~/.gitconfig #287

pixelastic opened this issue May 2, 2016 · 1 comment
Labels

Comments

@pixelastic
Copy link

Hello,

When I try to start a new gem project with jeweler hello-world, I'm greeted with the following message:

Encountered an error while adding origin remote. Maybe you have some weird settings in ~/.gitconfig?
/home/tim/.rvm/gems/ruby-2.2.3/gems/git-1.3.0/lib/git/lib.rb:937:in `command': git '--git-dir=/tmp/hello-world/.git' '--work-tree=/tmp/hello-world' remote 'add' '--' 'origin' 'git@github.com:pixelastic/hello-world.git'  2>&1:fatal: remote origin already exists. (Git::GitExecuteError)
        from /home/tim/.rvm/gems/ruby-2.2.3/gems/git-1.3.0/lib/git/lib.rb:688:in `remote_add'
        from /home/tim/.rvm/gems/ruby-2.2.3/gems/git-1.3.0/lib/git/base.rb:371:in `add_remote'
        from /home/tim/.rvm/gems/ruby-2.2.3/gems/jeweler-2.0.1/lib/jeweler/generator.rb:279:in `block in create_version_control'
        from /home/tim/.rvm/gems/ruby-2.2.3/gems/jeweler-2.0.1/lib/jeweler/generator.rb:258:in `chdir'
        from /home/tim/.rvm/gems/ruby-2.2.3/gems/jeweler-2.0.1/lib/jeweler/generator.rb:258:in `create_version_control'
        from /home/tim/.rvm/gems/ruby-2.2.3/gems/jeweler-2.0.1/lib/jeweler/generator.rb:129:in `run'
        from /home/tim/.rvm/gems/ruby-2.2.3/gems/jeweler-2.0.1/lib/jeweler/generator/application.rb:34:in `run!'
        from /home/tim/.rvm/gems/ruby-2.2.3/gems/jeweler-2.0.1/bin/jeweler:9:in `<top (required)>'
        from /home/tim/.rvm/gems/ruby-2.2.3/bin/jeweler:23:in `load'
        from /home/tim/.rvm/gems/ruby-2.2.3/bin/jeweler:23:in `<main>'
        from /home/tim/.rvm/gems/ruby-2.2.3/bin/ruby_executable_hooks:15:in `eval'
        from /home/tim/.rvm/gems/ruby-2.2.3/bin/ruby_executable_hooks:15:in `<main>'

I do have something related to the origin remote in my ~/.gitconfig:

[remote "origin"]
  prune = true

(This allow auto pruning of deleted remote branches when doing a pull)

Still, jeweler seems to be choking on it because it is trying to create a remote that already exists. Removing the config from my .gitconfig lets me use the gem correctly.

I'm using git v2.8.0.rc1

@flajann2
Copy link
Collaborator

Thanks for this submission. I will take a look at it shortly.

@flajann2 flajann2 added the bug label Oct 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants