Giter Club home page Giter Club logo

Comments (11)

ldelossa avatar ldelossa commented on July 26, 2024 1

Cool, thanks @David-Kunz.

a little unscientific @dlvhdr but seems like on all our systems the gh cli matches the git protocol that works. Just wanted to make sure.

from gh.nvim.

ldelossa avatar ldelossa commented on July 26, 2024 1

Closed! Thanks again @dlvhdr

from gh.nvim.

ldelossa avatar ldelossa commented on July 26, 2024

Aha!

🖭  gh config list
git_protocol=ssh
editor=
prompt=enabled
pager=
http_unix_socket=
browser=

That would be pretty cool, and probably the right thing to do, so you're thinking, on gh.nvim startup, do something like:

🖭  gh config get git_protocol
https

and then automatically set the git remote accordingly?

from gh.nvim.

dlvhdr avatar dlvhdr commented on July 26, 2024

Yes I think thats the approach

from gh.nvim.

ldelossa avatar ldelossa commented on July 26, 2024

Would you want to take on that PR? Seems relatively straight forward.

from gh.nvim.

dlvhdr avatar dlvhdr commented on July 26, 2024

Yeah I can do that

from gh.nvim.

ldelossa avatar ldelossa commented on July 26, 2024

Cool, we may want an "auto" flag in the "prefer_https_remotes" config value, where we dynamically look it up. This then still allows the user to force "ssh" or "https" if they want to. Maybe its useful?

from gh.nvim.

dlvhdr avatar dlvhdr commented on July 26, 2024

My intuition is that a user wouldn't need to define a different protocol for gh.nvim that is different than gh.
I would add it in the future if there's an interest but I could be wrong here

from gh.nvim.

ldelossa avatar ldelossa commented on July 26, 2024

@David-Kunz in issue #15 you had to flip the "prefer_https_remote" flag in your private repo.

In this issue we are trying to determine if we looked at the "gh config list" command and set the remote type with the setting in there, would it have set the correct remote protocol for you?

Could you run that command in your private repo where you're using the "prefer_https_remote" flag and tell us the value of the "git_protocol" config.

from gh.nvim.

David-Kunz avatar David-Kunz commented on July 26, 2024

Hi @ldelossa,

When I execute gh config list, the value is gh_protocol=https.

Best regards,
David

from gh.nvim.

ldelossa avatar ldelossa commented on July 26, 2024

Thank occurred just now:

~/git/vim/litee-gh-testing remotes/litee-gh_ldelossa/litee-gh-testing/branch-1
🖭  gh config list
git_protocol=ssh
editor=
prompt=enabled
pager=
http_unix_socket=
browser=

~/git/vim/litee-gh-testing remotes/litee-gh_ldelossa/litee-gh-testing/branch-1
🖭  gh config get git_protocol
https

Weird lol. I manually set it to get it to work again.

~/git/vim/litee-gh-testing main
🖭  gh config set git_protocol ssh

~/git/vim/litee-gh-testing main
🖭  gh config get git_protocol    
ssh

from gh.nvim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.