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

pygit2: support 1.14 credentials #314

Merged
merged 2 commits into from
Jan 29, 2024
Merged

Conversation

pmrowla
Copy link
Contributor

@pmrowla pmrowla commented Jan 29, 2024

Fixes #311

@pmrowla pmrowla self-assigned this Jan 29, 2024
if os.name == "nt" and url.startswith("file://"):
url = url[len("file://") :]

yield self.repo.remotes.create_anonymous(url)
remote = self.repo.remotes.create_anonymous(url)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

create_anonymous will apply any configured URL rewrite rules (like insteadOf) before setting the returned remote.url, we should be checking the rewritten URL for SSH rather than the raw URL

@codecov-commenter
Copy link

codecov-commenter commented Jan 29, 2024

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (0d23565) 78.35% compared to head (7966177) 78.34%.

Files Patch % Lines
src/scmrepo/git/backend/pygit2/callbacks.py 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #314      +/-   ##
==========================================
- Coverage   78.35%   78.34%   -0.02%     
==========================================
  Files          39       39              
  Lines        4980     4982       +2     
  Branches      897      897              
==========================================
+ Hits         3902     3903       +1     
- Misses        924      925       +1     
  Partials      154      154              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pmrowla pmrowla merged commit 87a9e91 into iterative:main Jan 29, 2024
13 checks passed
@pmrowla pmrowla deleted the pygit2-1.14-creds branch January 29, 2024 06:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Archived in project
2 participants