martinthomson / i-d-template

A template for IETF internet draft git repositories
Other
207 stars 182 forks source link

"Fast" setup instructions tweak #379

Closed richsalz closed 1 year ago

richsalz commented 1 year ago

The sample URL:

git remote add origin https://github.com/unicorn-wg/unicorn-protocol

Should probably be ssh/git based:

git remote add origin git@github.com:unicorn-wg/unicorn-protocol.git
martinthomson commented 1 year ago

I'd be happy to take a PR.

FWIW, I use HTTPS, even if it is bearer-token-based, because I find it more convenient. Maybe that says something about my operational security practices, but I don't see this as particularly important.

richsalz commented 1 year ago

If HTTPS works, close this. I guess it doesn't for people who use 2FA? Or maybe my setup is strange.

richsalz commented 1 year ago

I also find it doesn't work in gh-pages, see https://github.com/richsalz/tls12-frozen/actions/runs/4875095072/jobs/8696865007#step:7:21

git -C /tmp/ghpages79 push -qf https://****@github.com/richsalz/tls12-frozen gh-pages
git -C /tmp/ghpages79 push -qf https://****@github.com/richsalz/tls12-frozen gh-pages
make[1]: *** [lib/ghpages.mk:127: ghpages] Error 1

Running by hand I get:

...
[gh-pages c4bb3fa] Script updating gh-pages from 3b1bf8a. [ci skip]
 2 files changed, 35 insertions(+), 36 deletions(-)
lib/trace.sh all -s ghpages-push git -C /tmp/ghpages56020 push -f https://github.com/richsalz/tls12-frozen gh-pages
Username for 'https://github.com': richsalz
Password for 'https://richsalz@github.com': 
remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/richsalz/tls12-frozen/'
make: *** [ghpages] Error 128
martinthomson commented 1 year ago

I can't access your repository settings, but that CI error occurs if the repository is not configured to allow write access from actions.

As for local pushes, that is a potential problem for people using SSH. That option works in CI, but it should be using the "origin" remote rather than trying to regenerate the full repository location. Or rather, it should be using $(shell git remote get-url --push $(GIT_REMOTE)), because the repository it is operating in is a temporary that is not configured in the same way. I can fix that for you.

richsalz commented 1 year ago

I can't access your repository settings, but that CI error occurs if the repository is not configured to allow write access from actions.

Doh! Not sure how I flubbed that. Thanks.

And thanks for the update.