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

Doesn't work with Windows #7

Open
bradcarman opened this issue Aug 13, 2022 · 5 comments
Open

Doesn't work with Windows #7

bradcarman opened this issue Aug 13, 2022 · 5 comments

Comments

@bradcarman
Copy link

It appears the Windows CI computer doesn't have SSH available.

Here is what I see...

Run julia-actions/add-julia-registry@v1
C:\Windows\System32\OpenSSH\ssh-agent.exe
unable to start ssh-agent service, error :1058
@bradcarman
Copy link
Author

With some googling I learned that I can add Set-Service ssh-agent -StartupType Manual and this did work to get past this error, so I have ...

    steps:
      - run: Set-Service ssh-agent -StartupType Manual
      - uses: actions/checkout@v2
      - uses: julia-actions/setup-julia@v1
        with:
          version: ${{ matrix.version }}
          arch: ${{ matrix.arch }}
      - uses: julia-actions/add-julia-registry@v1
        with:
          key: ${{ secrets.SSH_KEY }}
          registry: <org>/<name>

But now I'm getting the error [email protected]: Permission denied (publickey)., whereas I didn't with ubuntu. Maybe windows requires still something else to authenticate?

@tuckermcclure
Copy link

I have been having the same issue. The following appears to get me past it:

env:
  JULIA_PKG_USE_CLI_GIT: true
  
jobs:
  test:
    ...
    steps:
      - name: On Windows, add ssh-agent.
        run: Set-Service ssh-agent -StartupType Manual
        if: runner.os == 'Windows'
      - name: On Windows, make Git use the OpenSSH instead of whatever it uses internally.
        run: git config --global core.sshCommand C:\\Windows\\System32\\OpenSSH\\ssh.exe
        if: runner.os == 'Windows'
      - uses: actions/checkout@v2
      - uses: julia-actions/add-julia-registry@v1
        with:
          key: ${{ secrets.MY_SSH_KEY }}
          registry: MyOrg/MyRegistry

With this, my job is able to pull my registry and interpret the Registry.toml. However, it's still not actually working. Here's the error I see:

Error: EPERM: operation not permitted, rename 'C:\Users\RUNNER~1\AppData\Local\Temp\tmp-1668-gMSAQuJ016gD' -> 'C:\julia-packages\registries\[MyRegistry]'
    at Object.renameSync (fs.js:741:3)
    at rename (D:\a\_actions\julia-actions\add-julia-registry\v1\node_modules\fs-extra\lib\move-sync\move-sync.js:38:8)
    at doRename (D:\a\_actions\julia-actions\add-julia-registry\v1\node_modules\fs-extra\lib\move-sync\move-sync.js:33:10)
    at Object.moveSync (D:\a\_actions\julia-actions\add-julia-registry\v1\node_modules\fs-extra\lib\move-sync\move-sync.js:17:10)
    at cloneRegistry (D:\a\_actions\julia-actions\add-julia-registry\v1\main.js:48:8)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async main (D:\a\_actions\julia-actions\add-julia-registry\v1\main.js:64:3) {
  errno: -4048,
  syscall: 'rename',
  code: 'EPERM',
  path: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmp-1668-gMSAQuJ016gD',
  dest: 'C:\\julia-packages\\registries\\[MyRegistry]'
}

@tuckermcclure
Copy link

Seeing that the most recent commit to add-julia-registry touches the line reporting the error, I also tried running as [email protected] (just before that commit), and that fails similarly:

[Error: EPERM: operation not permitted, rename 'C:\Users\RUNNER~1\AppData\Local\Temp\tmp-1860-9tMW4VBMujN7' -> 'C:\julia-packages\registries\[MyRegistry]'] {
  errno: -4048,
  code: 'EPERM',
  syscall: 'rename',
  path: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmp-1860-9tMW4VBMujN7',
  dest: 'C:\\julia-packages\\registries\\[MyRegistry]'
}

(Note that my registry is not literally called [MyRegistry] but has a regular name that's just a-z.)

Any idea why a simple move from a temp directory would be failing?

@tuckermcclure
Copy link

Also note: After seeing the error, I tried setting JULIA_DEPOT_PATH: C:\\julia-packages in the environment variables to see if the destination was somehow a problem. This resulted in the same error. In my first comment in this thread, this is the result I copied and pasted. Note that without that environment variable, the failure is the same: Error: EPERM: operation not permitted, rename 'C:\Users\RUNNER~1\AppData\Local\Temp\tmp-6000-SC3I6OwDOPx1' -> 'C:\Users\runneradmin\.julia\registries\[MyRegistry]'.

@ancorso
Copy link

ancorso commented Apr 18, 2024

Did you end up making any progress on this?

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

3 participants