Skip to content

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

@SC-One

Description

@SC-One

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions