libgit2sharp is agnostic of GitHub Personal Access Token related errors
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 35/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Estagnada
- Stack de tecnologia
- csharp, git
- Domínio
- authentication, tooling
Direção de pesquisa
Reproduza o push para um repositório usando um PAT sem o escopo de workflow, modificando .github/workflows/deploy.yml, e compare o resultado com o comando Git mostrado na issue. Rastreie a operação de push e os erros relatados no código-fonte do libgit2sharp; considera-se concluído quando um push de workflow rejeitado lança uma exceção ou relata o erro remoto, em vez de parecer bem-sucedido.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Introduction
It's been a while since github deprecated the use of password on CLIs and applications. Personal access token is the way to get authenticated on these apps. libgit2sharp is quiet on errors and warnings pertinent to PATs.
For example,
access tokens can be created with only repository access. Which is restricted to do modifications outside the repository i.e., workflows, wikis and projects. Hence, trying to modify a workflow file using this token should outcome an access exception.
However, libgit2sharp behaves as if nothing happened when that event does occur. Nothing is performed, push fails, however, there is no error/warning report from libgit2sharp.
Reproduction steps
Create a PAT with only repository access. Now try to push a commit that modifies a workflow file.
Expected behavior
Show throw an exception or report an error.
Actual behavior
Does not throw an exception, behaves as if push was successful. However, push actually failed.
to mimic the behavior of git, behavior of libgit2sharp should look like following,
I created an example commit that modified following github workflow file: D:\Code\MyBlog\.github\workflows\deploy.yml
git properly reports the error,
$ git push origin dev
Enumerating objects: 17, done.
Counting objects: 100% (17/17), done.
Delta compression using up to 16 threads
Compressing objects: 100% (6/6), done.
Writing objects: 100% (9/9), 804 bytes | 268.00 KiB/s, done.
Total 9 (delta 4), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (4/4), completed with 4 local objects.
To https://github.com/matrix/blog.git
! [remote rejected] dev -> dev (refusing to allow a Personal Access Token to create or update workflow `.github/workflows/deploy.yml` without `workflow` scope)
error: failed to push some refs to 'https://github.com/matrix/blog.git'
Version of LibGit2Sharp (release number or SHA1)
Latest
Operating system(s) tested; .NET runtime tested
Win 10, net sdk: 6.0.101
- Linguagem predominante
- C#
- Estrelas
- 3.5k
- Forks
- 925
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de libgit2/libgit2sharp
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 52/100
libgit2/libgit2sharp#2193 · 2 comentários ·
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 38/100
libgit2/libgit2sharp#2192 · 1 comentário ·
-
Website is down Aberta
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 20/100
libgit2/libgit2sharp#2191 · 2 reações ·
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 68/100
libgit2/libgit2sharp#2189 · 1 reação ·
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 35/100
libgit2/libgit2sharp#2187 · 2 comentários ·
Todas as issues de libgit2/libgit2sharp
Issues semelhantes
-
bug
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 75/100
sillsdev/languageforge-lexbox#2665 ·
-
bug documentation frontend
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
azurenoops/spin_agent#975 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 86/100
-
:watch: Not Triaged 11.0 fundamentals/subsvc
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 92/100
dotnet/AspNetCore.Docs#37699 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
SubtitleEdit/subtitleedit#15108 · 1 comentário ·