# Creating a registry

**URL:** <https://discourse.julialang.org/t/creating-a-registry/12094>\
**Category:** General Usage\
**Tags:** package, tutorials, registry\
**Created:** [July 2, 2018, 12:38am UTC](https://discourse.julialang.org/t/creating-a-registry/12094 "2018-07-02T00:38:13Z")\
**Posts on this page:** 10\
**Page:** 2

<div class="post-metadata">

**Author:** ![deionr21](https://avatars.discourse-cdn.com/v4/letter/d/aca169/32.png) [@deionr21](https://discourse.julialang.org/u/deionr21)\
**Post date:** [May 4, 2020, 3:55pm UTC](https://discourse.julialang.org/t/creating-a-registry/12094/21 "2020-05-04T15:55:03Z")

</div>

I am having some issues with completing some of the steps in the provided instructions.

I was wondering if the author or someone who has been able to successfully complete these steps help with some of the roadblocks that I am hitting.ls

When it gets to the following steps below I am a little confused on how to use the uuid function.

Registry.toml

We can use `UUIDs.uuid1()` to generate a uuid for the registry, and we will need to check `TestPackage` 's `Project.toml` file to find its uuid.

name = “TestRegistry”  
uuid = “f1b7bfcd-108e-44d3-8130-d7177e4bc6a1”  
repo = “[https://github.com/](https://github.com/)/TestRegistry.jl.git”  
description = “This is only a test.”

[packages]  
28cd688e-7cf2-11e8-01a0-0dc1d6450aeb = { name = “TestPackage”, path = “TestPackage” }

---

<div class="post-metadata">

**Author:** ![GunnarFarneback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gunnarfarneback/32/1827_2.png) [@GunnarFarneback](https://discourse.julialang.org/u/GunnarFarneback)\
**Post date:** [May 4, 2020, 5:07pm UTC](https://discourse.julialang.org/t/creating-a-registry/12094/22 "2020-05-04T17:07:29Z")

</div>

I would recommend that you try [LocalRegistry](https://github.com/GunnarFarneback/LocalRegistry.jl).

---

<div class="post-metadata">

**Author:** ![MatthijsCox](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/matthijscox/32/42831_2.png) [@MatthijsCox](https://discourse.julialang.org/u/MatthijsCox)\
**Post date:** [May 4, 2020, 5:16pm UTC](https://discourse.julialang.org/t/creating-a-registry/12094/23 "2020-05-04T17:16:24Z")

</div>

I was wondering how this discussion relates to LocalRegistry. We are investigating how to set up a private registry for internal Bitbucket servers and LocalRegistry seems easy enough.

---

<div class="post-metadata">

**Author:** ![GunnarFarneback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gunnarfarneback/32/1827_2.png) [@GunnarFarneback](https://discourse.julialang.org/u/GunnarFarneback)\
**Post date:** [May 4, 2020, 5:21pm UTC](https://discourse.julialang.org/t/creating-a-registry/12094/24 "2020-05-04T17:21:08Z")

</div>

The earlier discussion predates LocalRegistry but was also an indirect starting point for it.

---

<div class="post-metadata">

**Author:** ![deionr21](https://avatars.discourse-cdn.com/v4/letter/d/aca169/32.png) [@deionr21](https://discourse.julialang.org/u/deionr21)\
**Post date:** [May 4, 2020, 5:35pm UTC](https://discourse.julialang.org/t/creating-a-registry/12094/25 "2020-05-04T17:35:29Z")

</div>

It looks like I run into issues trying to use the command below.

Julia is stating that I have a syntax issue.

using LocalRegistry

create\_registry(name, repository\_url, description = “My private registry”)

---

<div class="post-metadata">

**Author:** ![deionr21](https://avatars.discourse-cdn.com/v4/letter/d/aca169/32.png) [@deionr21](https://discourse.julialang.org/u/deionr21)\
**Post date:** [May 4, 2020, 5:48pm UTC](https://discourse.julialang.org/t/creating-a-registry/12094/26 "2020-05-04T17:48:18Z")

</div>

I got the following syntax error, it looks like it does not like the URL that I provided that I planned on using for the registry. EX: [https://github.com/](https://github.com/)/

ERROR: syntax: “//” is not a unary operator

---

<div class="post-metadata">

**Author:** ![GunnarFarneback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gunnarfarneback/32/1827_2.png) [@GunnarFarneback](https://discourse.julialang.org/u/GunnarFarneback)\
**Post date:** [May 4, 2020, 5:56pm UTC](https://discourse.julialang.org/t/creating-a-registry/12094/27 "2020-05-04T17:56:00Z")

</div>

The repository url needs to be a string (as does the name). From the error message it sounds like you’re missing the quotation marks.

---

<div class="post-metadata">

**Author:** ![Allan\_Baker](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/allan_baker/32/42645_2.png) [@Allan\_Baker](https://discourse.julialang.org/u/Allan_Baker)\
**Post date:** [December 1, 2020, 2:49pm UTC](https://discourse.julialang.org/t/creating-a-registry/12094/28 "2020-12-01T14:49:47Z")

</div>

For the git-tree-sha1 in the Versions.toml, it says to run git log to get the hash of the most recent commit. The registry wants this to be a git-tree-sha1 and not a commit sha1, how do I get that? These instructions seem no longer correct for latest version. Is there a better how to to make a registry?

---

<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:** [December 1, 2020, 3:04pm UTC](https://discourse.julialang.org/t/creating-a-registry/12094/29 "2020-12-01T15:04:23Z")

</div>

> [@Allan\_Baker](#):
>
> For the git-tree-sha1 in the Versions.toml, it says to run git log to get the hash of the most recent commit. The registry wants this to be a git-tree-sha1 and not a commit sha1, how do I get that?

From earlier in this thread:

> [@cstjean](#):
>
> To get the tree-sha, use `git log --pretty=format:'%T %s'` instead of `git log` , which returns the commit SHA.

> [@Allan\_Baker](#):
>
> Is there a better how to to make a registry?

From earlier in this thread:

> [@GunnarFarneback](#):
>
> I would recommend that you try [LocalRegistry](https://github.com/GunnarFarneback/LocalRegistry.jl).

---

<div class="post-metadata">

**Author:** ![Allan\_Baker](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/allan_baker/32/42645_2.png) [@Allan\_Baker](https://discourse.julialang.org/u/Allan_Baker)\
**Post date:** [December 1, 2020, 3:13pm UTC](https://discourse.julialang.org/t/creating-a-registry/12094/30 "2020-12-01T15:13:12Z")

</div>

Thank you for the response. I did stumble upon the update in the replies right as you were posting your response.

[Previous page](https://discourse.julialang.org/t/creating-a-registry/12094.md?page=1)
