Skip to content

Clone with member of the repo[not owner] #12

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

Open
SC-One opened this issue Apr 30, 2024 · 0 comments · May be fixed by #13
Open

Clone with member of the repo[not owner] #12

SC-One opened this issue Apr 30, 2024 · 0 comments · May be fixed by #13

Comments

@SC-One
Copy link

SC-One commented Apr 30, 2024

Hello
Recently I wanted to clone a repo that Im not owned that, but the owner gave me the access to do anything there.(so I can create my PAT too)
the flow code:

    - name: cloning deps
      uses: GuillaumeFalourd/clone-github-repo-action@v2.3
      with:
        owner: 'RealOwner'
        branch: master
        repository: 'RepoName'
        access-token: ${{ secrets.PAT}}  ##  but this is my PAT, not the owner. how resolve this without requesting PAT from the owner?

Edit: why I asked this question?

because when I insert my PAT , it giving some errors:
fatal: could not read Username for 'https://github.com/': Device not configured

Solution

Im not sure but I think it can solve this problem.
the pattern that we should do: git clone https://username:password@github.com/username/repository.git

so we should add another input like username, and add something (in link and other lines)like this:

git clone --branch "${{ inputs.branch }}" --depth="${{ inputs.depth }}" https://${{ inputs.thirduser }}:${{ inputs.access-token }}@github.com/${{ inputs.owner }}/${{ inputs.repository }}.git

pull requested, please check and confirm that if it's ok.(Im not sure)
#13

@GuillaumeFalourd GuillaumeFalourd linked a pull request Apr 30, 2024 that will close this issue
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 a pull request may close this issue.

1 participant