Error fetching github package source. HTTP 401: Unauthorized

I have made a shiny app depend on a public github packge. The "multipleROC" is a public github package of my own. Not a private one. I have installed this package with the following R command. The installed devtools package is version 2.4.5.

devtools::install_github("cardiomoon/multipleROC")

This is a shiny app for testing the github package.

library(shiny)
library(multipleROC)

data(radial,package="moonBook")

ui <- fluidPage(

    # Application title
    titlePanel("ROC courve by multipleROC package"),

    # Sidebar with a slider input for number of bins
    sidebarLayout(
        sidebarPanel(
             selectInput("dep","Dependent Variable",choices=colnames(radial),selected="male"),
             selectInput("pred","Predictors:",choices=colnames(radial),multiple=TRUE)

        ),

        # Show a plot of the generated distribution
        mainPanel(
             verbatimTextOutput("text1"),
           plotOutput("plot1")
        )
    )
)

server <- function(input, output,session) {
    observe({
         choices1=setdiff(colnames(radial),input$dep)
         updateSelectInput(session,"pred",choices=choices1)

    })

      output$text1=renderPrint({
          if(length(input$pred)>0){
               equation=paste(input$dep,"~",paste0(input$pred,collapse="+"))

              cat(equation)
          } else{
               cat("Please select one or more predictor variable(s)")
          }
     })
    output$plot1 <- renderPlot({

         if(length(input$pred)>0){
              equation=paste(input$dep,"~",paste0(input$pred,collapse="+"))
         multipleROC(as.formula(equation),data=radial,plot=TRUE)
         }
    })
}

shinyApp(ui = ui, server = server)

When deploying the shiny app, it fails with the following error.

Preparing to deploy application...DONE
Uploading bundle for application: 9802026...DONE
Deploying bundle: 7659402 for application: 9802026 ...
Waiting for task: 1333986108
building: Building image: 9079222
building: Fetching packages
error: Building package: multipleROC
################################ Begin Task Log ################################ ################################# End Task Log #################################
Error: Unhandled Exception: Child Task 1333986109 failed: Error building image: Error fetching multipleROC (0.1.1) source. Error accessing GitHub repository cardiomoon/multipleROC. HTTP 401: Unauthorized Execution halted

I have the exact same issue with a shiny app of mine relying on a GitHub based R package.

Did you manage to resolve this?

1 Like

This fixed it for me: