There seem to be two different bugs here. Examples:
Using the pull= argument:
> devtools::install_github('rstudio/shiny', pull=342, ref=NULL)
Error: client error: (403) Forbidden
Using the user/repo#pull syntax:
> install_github('rstudio/shiny#342')
Error in FUN("rstudio/shiny#342"[[1L]], ...) :
Must specify either a ref or a pull request, not both. Perhaps you want to use 'ref=NULL'?