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

Is there a way to clone private repo using github token from specific branch #669

Open
kashiftufail opened this issue Aug 30, 2023 · 0 comments

Comments

@kashiftufail
Copy link

kashiftufail commented Aug 30, 2023

Hi,

I want to clone private repo using this code below. We are getting Github token from Github authentication.

        git_url = "https://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:x-oauth-basic@github.com/kashiftufail/fashi.git"   
        path = Rails.root.join('tmp','clone',"300")    
        g = Git.clone(git_url, "test", path: path)   
        g = Git.clone(git_url)

but this code i have gotten this error.

         Write access to repository not granted. fatal: unable to access 'https://github.com/kashiftufail/fashi.git/': The requested URL returned error: 403

Any help plz.

Thanks

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

No branches or pull requests

1 participant