ezyang / ghstack

Submit stacked diffs to GitHub on the command line
MIT License
657 stars 54 forks source link

incompatible with https cloned repo #174

Closed youkaichao closed 12 months ago

youkaichao commented 1 year ago

Hi, team, I'm trying to set up ghstack for pytorch, and encountered a problem. I document my solution here, in case anyone meet the same problem again.

My github remote is cloned via https:

$ git remote get-url origin
https://github.com/pytorch/pytorch.git

After I tried to set up github keys and use ghstack, the command still asks me for username and password.

The problem gets resolved after I change the remote to git-ssh based:

$ git remote get-url origin
git@github.com:pytorch/pytorch.git

Some related discussion from github: https://github.com/orgs/community/discussions/22394 .

In conclusion, the problem comes from my side. However, I suggest adding some documentation or code check to remind users that they should use git-ssh based remote url.

youkaichao commented 11 months ago

That's very helpful, thanks, Edward!