Hi,
I’m making a tutorial on Git for pyRevit users and got an issue when trying to install from private GitHub Repo.
ERROR [Extensions] Error installing package. | remote authentication required but no callback set
Traceback:
File "C:\Users\Lenny 16 Inch\AppData\Roaming\pyRevit-Master\extensions\pyRevitCore.extension\pyRevit.tab\pyRevit.panel\Extensions.smartbutton\script.py", line 405, in install_ext_pkg
extpkgs.install(self.selected_pkg.ext_pkg,
It’s a common issue but I had a solution that worked before, but not anymore.
The login and password in pyRevit extensions menu always gave an error, because GitHub has removed API access with the account password, and instead forced us to create Access Tokens since 2021 I think.
I had a solution that worked a year ago and it helped me and a few other people who asked me how to do it. But it doesn’t work anymore and I’m confused what has changed.
This is how I used to do that:
Open GitHub Account Settings
Open Developer’s Settings (The bottom option)
Click on Fine-Grained Tokens
Fill some values
Token Name(name shown in GitHub)
Expiration (I think 1 year is the max, you can try longer)
Repository Access: You can select All Repositories or select a specific one
Set Permissions for content access to read-only (IMPORTANT STEP!)
Click on Generate Token
Save Token to a Text File, or somewhere secure! GitHub won’t show it again!
Lastly, Write Credentials in pyRevit Extensions Menu and use token instead of a Password.
These steps used to work ~ 1 year ago, but recently I tried and nothing has worked. I wonder if anyone has a solution to that or I should dig deeper myself?
I was about to write you that I wasn’t able to install EF-Tools through extensions. Glad that you are aware of the issue hopefully it will be resolved soon.
EF-Tools is publicly available, and shouldn’t have any issues with installation.
Did you get any error messages during installation?
Usually people can’t install EF-Tools because of Firewall settings protecting companies from installing any software without IT permission.
Maybe ask if that could be the case.
I use variations of this batch script to handle install, update or removal of custom extensions from private repo using a token generated from Github, Bitbucket, etc.:
@echo off
REM Script to install, update or remove MY CUSTOM extension
REM Usage: YOUR_SCRIPT.bat install|update|remove [dev]
set "userprofile=%USERPROFILE%"
set "extension_path=%userprofile%\AppData\Roaming\pyRevit\Extensions"
set "extension_name=YOUR_EXTENSION_NAME"
if "%2"=="" (
set "repo_branch=master"
)
if "%2"=="dev" (
set "repo_branch=develop"
)
set "token=TOKEN"
set "repo_url=https://x-token-auth:%token%@PROVIDER.COM/USER/REPO_NAME.git"
if "%1"=="install" (
pyrevit extend ui %extension_name% %repo_url% --dest=%extension_path% --branch=%repo_branch% --debug
)
if "%1"=="update" (
echo Updating extension %extension_name% in %extension_path%
pyrevit extensions update %extension_name% --token=%token%
)
if "%1"=="remove" (
if not exist "%extension_path%" (
echo Extension path %extension_path% does not exist. Nothing done.
exit /b
)
echo Removing extension from pyRevit extensions paths
pyrevit extensions delete %extension_name%
pyrevit extensions paths forget %extension_path%
)