Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

191
Visualizações
GitHub credential authentication to push files on a repo

This question is some kind of follow up of this one:

Authorization when creating a file in Javascript in a GitHub repo using API

My goal is to create a static page with GitHub Pages with a simple button.

When a user presses this button, a new file is created in the same repository, with fixed content, in the same branch used for GitHub pages.

Suppose you have the address of GitHub Pages static page, for example:

https://github.com/MyGitHubAccount/MyGitHubRepo/blob/gh-pages/index.html

If this repo is public, anyone can go to this page and see the content in the browser.

Suppose a user wants to press the button to create the new file. I can see 3 scenarios:

  1. the user is not logged in GitHub -> if the user clicks the button, the file cannot be created in the repo

  2. the user is logged in GitHub, but MyGitHubRepo is not one of his repo -> if the user clicks the button, the file cannot be created in the repo

  3. the user is logged in GitHub and MyGitHubRepo is one of his repo

If the user clicks the button, is it possible to create and push the file in the repo? What are the conditions? Is there any example I can study?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

TiddlyWiki does what you want

( host on GH/GL Pages , save via JS and https:// git push with token )

See e.g. the Settings Dialogue here: https://doc-links-manual-howto.github.io/

TiddlyWiki SettingsExample

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda