Giter Club home page Giter Club logo

setup-git-credentials's People

Contributors

de-vri-es avatar dependabot[bot] avatar m-ou-se avatar revolution1 avatar smlgbl avatar vytautaslozickas avatar willwray avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

setup-git-credentials's Issues

Cannot find module './utils'

Dependabot upgraded all of our code to use fusion-engineering/[email protected]. We were using v2.0.3 prior to this. Now we get this error when using it in the same way as before. Reverting has fixed our issue.

CleanShot 2020-12-18 at 14 08 51@2x

Error while using the action

Hello!

I'm running this action inside a docker container (unrelated or not) but I'm getting the following error.
image

It's probably here

await fs.mkdir(`${xdg_config_home()}/git`, { recursive: true });

I'll debug it a little

Credentials in some cases are appended without newline

I had an issue with the action today where lines to the .config/git/credentials were appended without newline.

Example:

I'm using:

  • A self-hosted runner running Amazon Linux 2
  • setup-git-credentials v2.0.6

I solved it by removing the credentials file and re-running the ci, for some reason this time it decided to add newlines, but I have no idea why and what is the cause of this.

https://foo:[email protected]
https://foo:[email protected]

I can provide more info if needed, let me know.

Node.js 12 actions are deprecated.

Description

This action generates the following warning in GitHub Actions Annotations:

Node.js 12 actions are deprecated. For more information see: https://github.blog/changelog/2022-09-22-github-
actions-all-actions-will-begin-running-on-node16-instead-of-node12/. Please update the following actions 
to use Node.js 16: fusion-engineering/setup-git-credentials@v2

Regarding the loading error of action.yaml

Hello,

I hope this message finds you well. I have been using de-vri-es/setup-git-credentials@v2 action, but I have encountered the following error:

Error: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. (Parameter ''using: node20' is not supported, use 'docker', 'node12' or 'node16' instead.')
   at GitHub.Runner.Worker.ActionManifestManager.ConvertRuns(IExecutionContext executionContext, TemplateContext templateContext, TemplateToken inputsToken, String fileRelativePath, MappingToken outputs)
   at GitHub.Runner.Worker.ActionManifestManager.Load(IExecutionContext executionContext, String manifestFile)
Error: Fail to load de-vri-es/setup-git-credentials/v2/action.yml

Even when I specify @v2.1.0, I still encounter the same error.

Could you please take a look into this issue and provide assistance?

Thank you for your attention.

Repository not found : fusion-engineering/setup-git-credentials

Hi, our workflows started failing with the above error this afternoon. The fusion-engineering/setup-git-credentials redirects here. Just wondering if the repository was moved/renamed today or if this is a case of github action runners no longer following redirects?

take dollar sign out

https://$username:$[email protected]/

take the dolar signs off or at least put a warning, I was using with the dollar sign

also should be nice to say to people that they should create a secrets with this variable

thanks anyway for the nice action

Error: Cannot find module '@actions/core'

Hi there

I'm using https://github.com/nektos/act for local crafting / debuguing of my GitHub Actions.

It's ๐Ÿ’ฅ 'ing like this

[Tests/tests] โญ  Run Setup git credentials
[Tests/tests]   โ˜  git clone 'https://github.com/fusion-engineering/setup-git-credentials' # ref=v2
[Tests/tests]   ๐Ÿณ  docker cp src=/home/remy/.cache/act/fusion-engineering-setup-git-credentials@v2 dst=/actions/
| internal/modules/cjs/loader.js:985
|   throw err;
|   ^
| 
| Error: Cannot find module '@actions/core'
| Require stack:
| - /actions/fusion-engineering-setup-git-credentials@v2/lib/main.js
|     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:982:15)
|     at Function.Module._load (internal/modules/cjs/loader.js:864:27)
|     at Module.require (internal/modules/cjs/loader.js:1044:19)
|     at require (internal/modules/cjs/helpers.js:77:18)
|     at Object.<anonymous> (/actions/fusion-engineering-setup-git-credentials@v2/lib/main.js:18:27)
|     at Module._compile (internal/modules/cjs/loader.js:1158:30)
|     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
|     at Module.load (internal/modules/cjs/loader.js:1002:32)
|     at Function.Module._load (internal/modules/cjs/loader.js:901:14)
|     at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12) {
|   code: 'MODULE_NOT_FOUND',
|   requireStack: [
|     '/actions/fusion-engineering-setup-git-credentials@v2/lib/main.js'
|   ]
| }

Can you give me an hint about what went wrong ?

If you want to reproduce, I'm using act 0.2.8 (~ latest) with the command act -P ubuntu-latest=nektos/act-environments-ubuntu:18.04 -s GIT_CREDENTIALS=https://me:[email protected] (warning, this docker image is ~18G big) and here's my workflow

name: Tests

on:
  push:
    tags:
      - "*"

jobs:
  tests:

    runs-on: ubuntu-latest
    strategy:
      matrix:
        python: [3.7]

    steps:
      - uses: actions/checkout@v2

      - name: Setup Python
        uses: actions/setup-python@v2
        with:
          python-version: ${{ matrix.python }}

      - name: Cache pip
        uses: actions/cache@master
        with:
          path: ~/.cache/pip
          key: ${{ runner.os }}-pip
          restore-keys: |
            ${{ runner.os }}-pip

      - name: Install Tox
        run: pip install tox

      - name: Cache Tox
        uses: actions/cache@master
        with:
          path: ~/.tox
          key: ${{ runner.os }}-tox-${{ hashFiles('**/tox.ini') }}
          restore-keys: |
            ${{ runner.os }}-tox-

      - name: Install Tox
        run: pip install tox

      - name: Setup git credentials
        uses: fusion-engineering/setup-git-credentials@v2
        with:
          credentials: ${{secrets.GIT_CREDENTIALS}}

      - name: Run Tox
        run: tox

Latest changes not applied to the `v2` tag.

Description

I set my action to use de-vri-es/setup-git-credentials@v2 but this isn't picking up the latest changes. The expectation I have when setting my versioning this way is that my action will use all Minor and Revision updates of the Major version.

Solution

Update the release process so that all revision changes with the same Major version get applied to the v# tag as well.

Credentials are not properly configured and/or propogated

I have an Organization setting for my repos. I am building go binary for one with another private module in a different repo. The token supplied has organization setting.

With the below action the repo itself is not found. Am I missing any settings?

    - uses: fusion-engineering/setup-git-credentials@v2
      with:
        credentials: ${{ secrets.SNMIX_REPO_ACCESS_TOKEN }}
    - run: cat ~/.gitconfig

Output when running the action:

Run fusion-engineering/setup-git-credentials@v2
  with:
    credentials: ***
  env:
    GOROOT: /opt/hostedtoolcache/go/1.15.5/x64
git config --global credential.helper store
git config --global url.https://github.com/.insteadOf ssh://[email protected]/
git config --global --add url.https://github.com/.insteadOf [email protected]:

Run cat ~/.gitconfig
[credential]
	helper = store
[url "https://github.com/"]
	insteadOf = ssh://[email protected]/
	insteadOf = [email protected]:

Error: cannot overwrite multiple values with a single value when using a self-hosted runner

Run fusion-engineering/setup-git-credentials@v2
  with:
    credentials: ***
git config --global credential.helper store
git config --global url.https://github.com/.insteadOf ssh://[email protected]/
warning: url.https://github.com/.insteadof has multiple values
error: cannot overwrite multiple values with a single value
       Use a regexp, --add or --replace-all to change url.https://github.com/.insteadOf.
Error: The process 'git' failed with exit code 5

error: cannot overwrite multiple values with a single value

Run fusion-engineering/setup-git-credentials@v2
  with:
    credentials: ***github.com/
git config --global credential.helper store
git config --global url.https://github.com/.insteadOf ssh://[email protected]/
warning: url.https://github.com/.insteadof has multiple values
error: cannot overwrite multiple values with a single value
       Use a regexp, --add or --replace-all to change url.https://github.com/.insteadOf.
      - name: Git Credentials
        uses: fusion-engineering/setup-git-credentials@v2
        with:
          credentials: "https://${{ secrets.GIT_BASIC_AUTHORIZATION }}@github.com/"
      - run: |
          git config --global --replace-all user.email "***@***.***"
          git config --global --replace-all user.name "***"

UncaughtException on Windows runner

(Works for me on ubuntu-22.04 and macos-12 github runners, thanks.)

Fails on windows-2022 and windows-2019 runners with:

[Windows 2022]
Run de-vri-es/setup-git-credentials@v2
node:internal/process/promises:246
          triggerUncaughtException(err, true /* fromPromise */);
          ^

[Error: EPERM: operation not permitted, ftruncate] {
  errno: -4048
  code: 'EPERM',
  syscall: 'ftruncate'
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.