Cannot pull private parent repository due to missing auth in git client
Xerkus opened this issue ยท 2 comments
Xerkus commented
๐ Summary
Private parent repository can not be pulled because git client does not receive the token required for authentication.
To reproduce
Steps to reproduce the behavior:
- Setup lineage action as usual and ensure it works
- Make parent repository private and make sure PAT has access to the now private repository
- Run action
Expected behavior
Parent repository is pulled and merge branch is created
Any helpful log output or screenshots
Paste the results here:
Xerkus/public-lineage-test
INFO Checking: Xerkus/public-lineage-test
INFO Lineage configuration found for Xerkus/public-lineage-test
INFO Cloning repository: https://github.com/Xerkus/public-lineage-test.git
INFO โ
success
INFO Processing lineage: skeleton
INFO Upstream: https://github.com/Xerkus/private-lineage-parent.git HEAD
INFO Attempting to switch to branch: lineage/skeleton
INFO โ
(error ok) return code: 128
INFO Branch did not exist. Creating: lineage/skeleton from local main
INFO Creating branch lineage/skeleton from main
INFO โ
success
INFO Switching to lineage/skeleton
INFO โ
success
INFO Pull request branch is new: True
INFO Fetching https://github.com/Xerkus/private-lineage-parent.git HEAD
Traceback (most recent call last):
CRITICAL fatal: could not read Username for 'https://github.com': No such device or address
CRITICAL โ ERROR! return code: 128
File "/usr/local/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/local/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/src/lineage/__main__.py", line 5, in <module>
main()
File "/src/lineage/entrypoint.py", line 431, in main
fetch(repo, remote_url, remote_branch)
File "/src/lineage/entrypoint.py", line 149, in fetch
run([GIT, "fetch", remote_url, remote_branch], cwd=repo.full_name)
File "/src/lineage/entrypoint.py", line 68, in run
raise Exception("Subprocess was expected to exit with 0.")
Exception: Subprocess was expected to exit with 0.
mcdonnnj commented
@Xerkus As I mentioned in your other issue would you try the improvement/use_github_api_for_all_access branch and see if things work as you expect?
Xerkus commented
Git client is missing auth when trying to clone the downstream repo. I assume same is true for cloning the private parent repo as well
INFO Checking: Xerkus/private-lineage-test
INFO Lineage configuration found for Xerkus/private-lineage-test
INFO Cloning repository: https://github.com/Xerkus/private-lineage-test.git
CRITICAL Cloning into 'Xerkus/private-lineage-test'...
fatal: could not read Username for 'https://github.com': No such device or address
CRITICAL โ ERROR! return code: 128
ERROR Unable to clone Xerkus/private-lineage-test.
Traceback (most recent call last):
File "/src/lineage/entrypoint.py", line 406, in main
run([GIT, "clone", repo.clone_url, repo.full_name])
File "/src/lineage/entrypoint.py", line 69, in run
raise Exception("Subprocess was expected to exit with 0.")
Exception: Subprocess was expected to exit with 0.
Repo where action runs is not the same repo