# Adding packages over SSH

**URL:** <https://discourse.julialang.org/t/adding-packages-over-ssh/29406>\
**Category:** General Usage\
**Created:** [October 2, 2019, 1:17pm UTC](https://discourse.julialang.org/t/adding-packages-over-ssh/29406 "2019-10-02T13:17:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![cshenton](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cshenton/32/9326_2.png) [@cshenton](https://discourse.julialang.org/u/cshenton)\
**Post date:** [October 2, 2019, 1:17pm UTC](https://discourse.julialang.org/t/adding-packages-over-ssh/29406/1 "2019-10-02T13:17:46Z")

</div>

I’m distributing a Julia package internal to my company and want an easy workflow for users to add package dependencies to their Julia projects.

I can’t use `Pkg` for this because the default way of adding non registered packages is:

```julia
add https://github.com/orgname/reponame

```

This uses https, which I can’t use since my organisation requires an additional authorisation flow over https. How can I add a git package dependency using ssh? The following does not work:

```julia
add git://github.com/orgname/reponame.git
# ERROR: git://github.com/orgname/reponame.git is not a valid packagename

```

Providing URIs for ssh used to work with `clone`, but that no longer works.

---

<div class="post-metadata">

**Author:** ![cshenton](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cshenton/32/9326_2.png) [@cshenton](https://discourse.julialang.org/u/cshenton)\
**Post date:** [October 2, 2019, 1:23pm UTC](https://discourse.julialang.org/t/adding-packages-over-ssh/29406/2 "2019-10-02T13:23:05Z")

</div>

And as a follow up, how would I create an internal registry that also works via SSH? i.e. when someone types `add MyPackage` and `MyPackage` is in the internal registry, make sure that pulls the repo over ssh.

---

<div class="post-metadata">

**Author:** ![platawiec](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/platawiec/32/31914_2.png) [@platawiec](https://discourse.julialang.org/u/platawiec)\
**Post date:** [October 2, 2019, 1:30pm UTC](https://discourse.julialang.org/t/adding-packages-over-ssh/29406/3 "2019-10-02T13:30:09Z")

</div>

The correct incantation is:

```julia
add git@github.com:orgname/reponame.git

```

See [1. Introduction · Pkg.jl](https://julialang.github.io/Pkg.jl/v1/)

You should be able to use ssh in a custom registry by using the correct API commands when creating the registry, here: [12. API Reference · Pkg.jl](https://julialang.github.io/Pkg.jl/v1/api/#Registry-API-Reference-1)

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [October 2, 2019, 2:01pm UTC](https://discourse.julialang.org/t/adding-packages-over-ssh/29406/4 "2019-10-02T14:01:27Z")

</div>

[12. API Reference · Pkg.jl](https://julialang.github.io/Pkg.jl/v1/api/#Pkg.setprotocol)!

---

<div class="post-metadata">

**Author:** ![cshenton](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cshenton/32/9326_2.png) [@cshenton](https://discourse.julialang.org/u/cshenton)\
**Post date:** [October 2, 2019, 2:05pm UTC](https://discourse.julialang.org/t/adding-packages-over-ssh/29406/5 "2019-10-02T14:05:26Z")

</div>

Thanks platawiec that solves my immediate problem and thanks also fredriekekre!
