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

Authentication fails #30

Closed
aiurovet opened this issue Jul 15, 2021 · 2 comments
Closed

Authentication fails #30

aiurovet opened this issue Jul 15, 2021 · 2 comments

Comments

@aiurovet
Copy link

aiurovet commented Jul 15, 2021

Hi team,

I've set up logins using PAT a while ago. Now, I'm trying to use your GitHub action to push files from a private repo doul to another private one doul-bin, but getting an error fatal: Authentication failed for 'https://github.com/aiurovet/doul-bin.git/':

      - name: Push the output to bin repository
        uses: dmnemec/copy_file_to_another_repo_action@main
        env:
          API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
        with:
          source_file: 'bin/${{ runner.os }}'
          destination_repo: 'aiurovet/doul-bin'
          destination_folder: '${{ runner.os }}'
          user_email: 'aiurovet@***'
          user_name: 'aiurovet'

So what am I doing wrong?

Please note also that the source project uses master branch, but the destination one uses main. Could this be a potential source of trouble? What does INPUT_DESTINATION_BRANCH mean, and how does input differ from source?

Here is the full output:

/usr/bin/docker run --name a33c192b39edaa4b34bf0b872c503d729e501_dfb933 --label 8a33c1 --workdir /github/workspace --rm -e OSTYPE -e PUB_CACHE -e API_TOKEN_GITHUB -e INPUT_SOURCE_FILE -e INPUT_DESTINATION_REPO -e INPUT_DESTINATION_FOLDER -e INPUT_USER_EMAIL -e INPUT_USER_NAME -e INPUT_DESTINATION_BRANCH -e INPUT_DESTINATION_BRANCH_CREATE -e INPUT_COMMIT_MESSAGE -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/doul/doul":"/github/workspace" 8a33c1:92b39edaa4b34bf0b872c503d729e501  "" "" "" "" "" "" ""
+ '[' -z bin/Linux ]
+ '[' -z  ]
+ INPUT_DESTINATION_BRANCH=main
+ OUTPUT_BRANCH=main
+ mktemp -d
+ CLONE_DIR=/tmp/tmp.fEPhlB
+ echo 'Cloning destination git repository'
+ git config --global user.email aiurovet@gmail.com
Cloning destination git repository
+ git config --global user.name aiurovet
+ git clone --single-branch --branch main ***github.com/aiurovet/doul-bin.git /tmp/tmp.fEPhlB
Cloning into '/tmp/tmp.fEPhlB'...
remote: Invalid username or password.
fatal: Authentication failed for 'https://github.com/aiurovet/doul-bin.git/'
@raaimo
Copy link

raaimo commented Aug 20, 2021

I guess you forgot to set API_TOKEN_GITHUB in repository Secrets.
https://github.com/dmnemec/copy_file_to_another_repo_action#variables

@aiurovet
Copy link
Author

aiurovet commented Aug 20, 2021

Yes, thanks, I figured that out already. It works, but unfortunately, is not usable for my purposes. I was going to build executables and icons for each platform separately, then copy to respective folder of another project. This solution, however, is not working on a Windows machine (possibly, will with some extra installs). Anyway, I decided to use a different approach.

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

2 participants