Skip to content

Conversation

@hparfr
Copy link

@hparfr hparfr commented Mar 11, 2025

Still experimental

I need to access private github repo.

In https://github.com/OCA/oca-github-bot/blob/master/src/oca_github_bot/github.py

    repo_url = f"https://github.com/{org}/{repo}"
    repo_url_with_token = f"https://{config.GITHUB_TOKEN}@github.com/{org}/{repo}"
    # fetch all branches into cache
    fetch_cmd = [
        "git",
        "fetch",
        "--quiet",
        "--force",
        "--prune",
        repo_url,
        "refs/heads/*:refs/heads/*",
    ]

for git fetch repo_url is used instead of repo_url_with_token; I'm not sure if the repo_url is displayed in case of error messages.

Using ssh protocol instead of http is easier to use in my case.

It's working but at the moment half finished.

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

Successfully merging this pull request may close these issues.

1 participant