Install and update pyRevit extension from a private repo

Hi everyone,
sorry for opening an old post but I found this very interesting and I wasn’t able to let the above hints work.

In the Command Prompt I wrote this code:

pyrevit extend ui extensionName --dest=“C:\Users\giuse\AppData\Roaming\pyRevit\Extensions” --token=“tokenOfMyAccount”

but doesn’t work and returns

Error: reference ‘refs/remotes/origin/master’ not found

What am I doing wrong? :no_mouth:
Thank you for the helping!

try with debug for more explicit error
maybe you master branch not being named master?

1 Like

Hi @Jean-Marc , thanks for answering. That was the problem.
By default, the GitHub branch was named “main”, renaming it to “master” all worked very fine.

Though I am not seeing the extension from the extension manager in pyRevit and when I try to update it with the command line

pyrevit extensions update extensionName --token=“tokenOfMyAccount”

it returns the following error:

Error: Installed extension “extensionName” not found. (pyRevitLabs.Common.PyRevitException)
… at pyRevitLabs.PyRevit.PyRevitExtensions.GetInstalledExtension(String searchPattern)
… at pyRevitCLI.PyRevitCLI.ProcessArguments()
… at pyRevitCLI.PyRevitCLI.Main(String[] args)

Maybe is because I download the repository content at the default path %appdata%\pyRevit\Extensions ?

it should not be an issue. I bumped into the pb several time due to typos in the extension name.
try a pyrevit env to make sure you have the proper extension name

Looking into pyrevit env was like the extension wasn’t even installed (but visible in the Revit ribbon bar)… then I tried deleting manually from the default extension path in %appdata% and installing the extension again but in a different folder… It worked! :white_check_mark:

I can’t be sure without knowing the code, but I think that is connected to the default path.
I wish it will be possible to deal with all of this simply using pyRevit, or maybe editing the extensions.json like I do for the public repositories.

Renaming main to master helped here too! Thank you for clarifying that.

1 Like