Skip to content

git-up fails when origin url is using https instead of ssh #103

Description

If git repository was cloned via https://url/repo instead of SSH (git@url:repo), executing git up in the directory always throws an error:

/usr/lib/ruby/gems/2.2.0/gems/grit-2.5.0/lib/grit/git-ruby.rb:116:in `chdir': Not a directory @ dir_chdir - /home/edv/projects/kapma/code/ops/salt-master/formula-source/gitlab-ci-runner-formula/.git (Errno::ENOTDIR)
        from /usr/lib/ruby/gems/2.2.0/gems/grit-2.5.0/lib/grit/git-ruby.rb:116:in `refs'
        from /usr/lib/ruby/gems/2.2.0/gems/grit-2.5.0/lib/grit/ref.rb:13:in `find_all'
        from /usr/lib/ruby/gems/2.2.0/gems/grit-2.5.0/lib/grit/repo.rb:213:in `heads'
        from /home/edv/.gem/ruby/2.2.0/gems/git-up-0.5.12/lib/git-up.rb:158:in `remote_map'
        from /home/edv/.gem/ruby/2.2.0/gems/git-up-0.5.12/lib/git-up.rb:154:in `remotes'
        from /home/edv/.gem/ruby/2.2.0/gems/git-up-0.5.12/lib/git-up.rb:12:in `run'
        from /home/edv/.gem/ruby/2.2.0/gems/git-up-0.5.12/bin/git-up:5:in `<top (required)>'
        from /home/edv/.gem/ruby/2.2.0/bin/git-up:23:in `load'
        from /home/edv/.gem/ruby/2.2.0/bin/git-up:23:in `<main>'

I am pretty sure the functionality of git up should work with either protocol (https on ssh). If not, then you could at least give a nicer warning message informing user on what is wrong.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions