Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

svp login generates an invalid authentication config file for github #130

Open
swichers opened this issue Apr 10, 2023 · 4 comments
Open

Comments

@swichers
Copy link

swichers commented Apr 10, 2023

Version svp 0.5.7

This is the file that svp login generates

[github]
url = https://github.com
private_token = <token>

Output:

~/d/app-example ❯❯❯ /home/user/.local/bin/svp run --recipe=./dbg.yml -- git@github.com:user/app-example.git
Accessing GitHub anonymously. To log in, run 'brz gh-login'.
Traceback (most recent call last):
  File "/home/user/.local/bin/svp", line 8, in <module>
    sys.exit(main())
  File "/home/user/.local/lib/python3.10/site-packages/silver_platter/__main__.py", line 141, in main
    return subcommands[args.subcommand](rest)
  File "/home/user/.local/lib/python3.10/site-packages/silver_platter/run.py", line 316, in main
    result = apply_and_publish(
  File "/home/user/.local/lib/python3.10/site-packages/silver_platter/run.py", line 77, in apply_and_publish
    existing_proposals) = find_existing_proposed(
  File "/home/user/.local/lib/python3.10/site-packages/silver_platter/publish.py", line 484, in find_existing_proposed
    existing_branch = forge.get_derived_branch(
  File "/home/user/.local/lib/python3.10/site-packages/breezy/plugins/github/forge.py", line 630, in get_derived_branch
    base_repo = self._get_repo(base_owner, base_project)
  File "/home/user/.local/lib/python3.10/site-packages/breezy/plugins/github/forge.py", line 447, in _get_repo
    raise NoSuchProject(path)
breezy.forge.NoSuchProject: Project does not exist: repos/user/app-example.

It seems like this is case sensitive. It actually needs to be

[Github]
url = https://github.com
private_token = <token>

Output:

~/d/app-example ❯❯❯ /home/user/.local/bin/svp run --recipe=./dbg.yml -- git@github.com:user/app-example.git
Branch dbg already exists (branch at git+ssh://git@github.com/user/app-example.git,branch=dbg)
Total 1624 (delta 1), reused 4 (delta 0), pack-reused 1611
Committing to: /tmp/tmponup_b4c/
added dbg.txt
Committed revision 131.
Text conflict in
Reusing existing repository https://github.com/user/app-example
found 0 deltas to reuse
<snip unrelated err>
@swichers
Copy link
Author

This might be an issue with the breezy plugin? I'm not seeing anywhere in this codebase that looks relevant.

@jelmer
Copy link
Owner

jelmer commented Apr 18, 2023

Hmm, that's strange - svp login is basically just a thin wrapper around breezy's login handling.

Is this fragment:

[github]
url = https://github.com
private_token = <token>

from your ~/.config/.breezy/authentication.conf ?

I wonder if there's something that's lowercasing section names.

@swichers
Copy link
Author

That's correct, it's from the auth config file. Using breezy directly generates the correct case but using svp does not. That's how I tracked down the issue.

@jelmer
Copy link
Owner

jelmer commented Apr 18, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants