# Github ci: add custom registry

**URL:** https://discourse.julialang.org/t/github-ci-add-custom-registry/63590
**Category:** General Usage
**Tags:** github, ci, registry, github-actions
**Created:** [June 26, 2021, 5:22am UTC](https://discourse.julialang.org/t/github-ci-add-custom-registry/63590 "2021-06-26T05:22:28Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![josePereiro](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/josepereiro/32/17322_2.png) [@josePereiro](https://discourse.julialang.org/u/josePereiro)
#### Post date: [June 26, 2021, 5:22am UTC](https://discourse.julialang.org/t/github-ci-add-custom-registry/63590/1 "2021-06-26T05:22:28Z")

</div>

Hi, I have a dependency that is not registered on `General` so I add this line to my `ci.yml` file (full file at the end) before to run the tests:

```nohighlight
- run: julia -e 'import Pkg; Pkg.Registry.add(Pkg.RegistrySpec(url = "https://github.com/josePereiro/CSC_Registry.jl"))'

```

All was fine for `linux` and `macos` but `windows` is throwing this error.

```shell
Run julia -e 'import Pkg; Pkg.Registry.add(Pkg.RegistrySpec(url = escape_string("https://github.com/josePereiro/CSC_Registry.jl")))'
  julia -e 'import Pkg; Pkg.Registry.add(Pkg.RegistrySpec(url = escape_string("https://github.com/josePereiro/CSC_Registry.jl")))'
  shell: C:\Program Files\PowerShell\7\pwsh.EXE -command ". '{0}'"
ERROR: syntax: "//" is not a unary operator
Stacktrace:
 [1] top-level scope at none:1
Error: Process completed with exit code 1.

```

What is the correct way of doing this?

Thank!

> **ci.yml**
>
> ```nohighlight
> name: CI
> on:
> pull_request:
> branches:
> - master
> push:
> branches:
> - master
> tags: '*'
> jobs:
> test:
> name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
> runs-on: ${{ matrix.os }}
> strategy:
> fail-fast: false
> matrix:
> version:
> - '1.5' # Replace this with the minimum Julia version that your package supports. E.g. if your package requires Julia 1.5 or higher, change this to '1.5'.
> - '1' # Leave this line unchanged. '1' will automatically expand to the latest stable 1.x release of Julia.
> - 'nightly'
> os:
> - ubuntu-latest
> - macOS-latest
> - windows-latest
> arch:
> - x64
> steps:
> - uses: actions/checkout@v2
> - uses: julia-actions/setup-julia@v1
> with:
> version: ${{ matrix.version }}
> arch: ${{ matrix.arch }}
> - uses: actions/cache@v1
> env:
> cache-name: cache-artifacts
> with:
> path: ~/.julia/artifacts
> key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
> restore-keys: |
> ${{ runner.os }}-test-${{ env.cache-name }}-
> ${{ runner.os }}-test-
> ${{ runner.os }}-
> - run: julia -e 'import Pkg; Pkg.Registry.add(Pkg.RegistrySpec(url = "https://github.com/josePereiro/CSC_Registry.jl"))'
> - uses: julia-actions/julia-buildpkg@v1
> - uses: julia-actions/julia-runtest@v1
> 
> ```

---

<div class="post-metadata">

### Author: ![KnutAM](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/knutam/32/37720_2.png) [@KnutAM](https://discourse.julialang.org/u/KnutAM)
#### Post date: [July 6, 2022, 2:31pm UTC](https://discourse.julialang.org/t/github-ci-add-custom-registry/63590/2 "2022-07-06T14:31:12Z")

</div>

Adding `shell: bash` solved this problem for me.

```julia
- run: julia -e 'using Pkg; Pkg.Registry.add(RegistrySpec(url = "..."))'
  shell: bash

```
