Skip to content

Commit

Permalink
credential: Remove leading slash before path
Browse files Browse the repository at this point in the history
The slash is incorrect according to #131 (comment)

"The leading "/" here is incorrect btw, and fails for credential helpers
that do naive string matching on URL path 😞. It should be just
path=f"{fork_info.owner}/{fork_info.name}.git""
  • Loading branch information
jerry-skydio committed Apr 3, 2024
1 parent c7b873f commit c7212a4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions revup/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -827,6 +827,7 @@ def __getattr__(self, attr: str) -> Any:

async def _run(self, subcommand: str, args: Dict[str, str]) -> Dict[str, str]:
input_str = "\n".join(f"{k}={v}" for k, v in args.items())
logging.debug("credential input:\n{}".format(input_str))
stdout_str = await self.git_ctx.git_stdout("credential", subcommand, input_str=input_str)
stdout_dict = {}
for line in stdout_str.splitlines():
Expand Down
2 changes: 1 addition & 1 deletion revup/revup.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ async def github_connection(
args.github_oauth = await git_ctx.credential(
protocol="https",
host=args.github_url,
path=f"/{fork_info.owner}/{fork_info.name}.git",
path=f"{fork_info.owner}/{fork_info.name}.git",
)
if args.github_oauth != "":
logging.debug("Used credential from git-credential")
Expand Down

0 comments on commit c7212a4

Please sign in to comment.