Skip to content

use git+ssh for use with private repo#316

Draft
hparfr wants to merge 2 commits intoOCA:masterfrom
hparfr:git+ssh
Draft

use git+ssh for use with private repo#316
hparfr wants to merge 2 commits intoOCA:masterfrom
hparfr:git+ssh

Conversation

@hparfr
Copy link
Copy Markdown

@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.

@legalsylvain
Copy link
Copy Markdown
Collaborator

hi @hparfr : Any news on that PR ?

Thanks !

@hparfr
Copy link
Copy Markdown
Author

hparfr commented Mar 31, 2026

Still using it in production. Works like a charm.

@legalsylvain
Copy link
Copy Markdown
Collaborator

Nice ! could you finish this PR ?

thanks !

@hparfr
Copy link
Copy Markdown
Author

hparfr commented Mar 31, 2026

If you use this PR, you don't use token anymore.

@legalsylvain
Copy link
Copy Markdown
Collaborator

If you use this PR, you don't use token anymore.

Yes. My point was, could you finish the PR & fix the CI ? so that all users can use that new feature.

thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants