"EACCES: permission denied" when using "firebase serve" - firebase

I am using "firebase serve" to test my Firebase web app locally. I ran into this error every time:
Error: EACCES: permission denied, open
'/Users/[my_user_name]/.config/configstore/#google-cloud/functions-emulator/.functions.json'
You don't have access to this file.
Error: EACCES: permission denied, open
'/usr/local/lib/node_modules/firebase-tools/node_modules/#google-cloud/functions-emulator/logs/cloud-functions-emulator.log'
It does work with a sudo. But I don't want to type in my sudo password every time. Every other command works fine without sudo except for this one.

If you don't want to run sudo every time, you need to install node in your home directory where you have full control. Don't use the node that you may have installed with a package manager using the system's default settings. The typical tool to help you with a home directory installation is Node Version Manager (nvm).

Related

Problem committing a project from RStudio to Github

I'm trying to push my files to my GitHub, but I'm getting the following error:
error: cannot run rpostback-askpass: No such file or directory
fatal: could not read Username for 'https://github.com': Device not configured
Details:
I'm using MAC
My git version: git version 2.32.1 (Apple Git-133)
I'm linking my project to GitHub with HTTP protocole
I ran git config --global user.name and user.mail in the terminal in Rstudio
I tried to use the solution of running git push -u origin main and when I type in my credentials, it gives me the error: "authentication failed". I never changed my password to GitHub, I checked it today to enter the website, it works.
I tried using ssh protocol instead but it seems to be giving me even more errors even though I created my ssh key and added it successfully to my GitHub. Specifically when I click on create new project and add the ssh link Rstudio says:
Cloning into 'data-science-hw'...
ssh_askpass: exec(rpostback-askpass): No such file or directory Host key verification failed.
fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
I went through all the possible suggestions I could find on the internet but none of them worked. I also tried linking a token generated by git, but it work either.
I would be very happy if anybody has any idea what else I could try..

Deploying a file in Artifactory's Web GUI generates an '<filename> undefined' error

I am using Artifactory Professional, version 5.6.0 rev 50600900
When I try to deploy a file through the Artifactory web UI, I'm getting an error: '<filename> is undefined' in a red popup box.
When I look in the system log, I see:
2018-05-15 08:25:41,037 [http-nio-8081-exec-123] [ERROR] (o.a.r.c.e.GlobalExceptionMapper:48) - Permission denied
java.io.IOException: Permission denied
The time corresponds to the time I tried the deploy
Uploads using a curl command or via the Artifactory plugin in Jenkins work without any problems.
I am an administrator on Artifactory. other users with Delete/Overwrite, Deploy/Cache, Annotate and Read also are not able to upload to repos via the web UI.
I get the undefined error with all files i try to deploy, large or small. this error occurs for users on windows, mac os and linux.
thanks in advance for any help.
Looks like an file system permissions issue. Make sure that the OS user running Artifactory has write permissions to <ARTIFACTORY_HOME>/data/tmp.
The artifacts uploaded from the UI are temporally saved under this folder.

heroku cli reports The system cannot find the path specified on Win 10

I'm having a problem with the Heroku CLI.
I was following the Heroku tutorial for Node.js.
I installed the Heroku CLI and checked that node --version, npm --version and git --version were at the latest version available.
I then run the command "heroku login" from git bash, but after inserting the email it complained about permissions so I re run git bash in administrator mode and everything seemed fine, I got to the part where you do "heroku create" it started downloading something but then I had a warning about not using git bash for "create" but to opt for powershell or cmd.
So I switched to cmd.exe with admin privileges but now the "heroku" command does nothing:
"$ heroku
The system cannot find the path specified."
The error seems related to my os, I checked my Windows Environment Variables and the path to heroku's exe is correctly set up (in fact it worked a bit earlier) to "C:\Program Files\Heroku\bin".
So I don't know how to use heroku at this point or what can I do to fix this error.

Symfony 2 fatal error on cache directory

I ssh to my VPS where there is a vagrant box that runs a symfony project.
When i try to access the project i am getting the error:
`Fatal error: Uncaught RuntimeException: Failed to write cache file` and
`Fatal error: Uncaught exception 'RuntimeException' with message 'Could not create cache directory`
I have tried fixing file permissions as mentioned here: http://symfony.com/doc/current/setup/file_permissions.html
and even changed chmod to 777. But still getting same error.
I also tried everything there: symfony2 : failed to write cache directory
It just won't work. Any help would be much appreciated.
My VPS is running ubuntu 16.04 and vagrant is latest version with image ubuntu/trusty
If you are running Apache check your /etc/httpd/conf/httpd.conf file and find your entry for your website in there. Check to see what user Apache is running the site as. You'll want to make sure the directories and files that make up your Symfony app belong to that user and the group the user is in as well. If you are logged in as root and are in the your Symfony directory you can run:
chown -R user:group *
to change all the files and directories to that user and group. Note to replace user and group in the command above with the actual username and group.
If you still have troubles after you've found the user apache is running as, try removing your symfony files completely (if it is a fresh project that you haven' been working on) and rebuild it while you are superuser'd (su) as that user. You probably built your project as root or another user.

Unix File Permissions issue with Jenkins CI and Github

I am in the process of installing Jenkins to push changes made to a Github repo to a "live" repo on my server.
I have installed Jenkins on my Ubuntu server and using its web interface I have installed the Github, Git and Github API plugins. I've also created a build task in Jenkins which runs some shell commands when Github detects that a push has been made to its repo.
The commands are running but I seem to be hitting a permissions issue. I get the following error in the Jenkins Console:
+ git pull origin master
error: cannot open .git/FETCH_HEAD: Permission denied
Build step 'Execute shell' marked build as failure
Finished: FAILURE
The parent directory for the site (and all its subdirectories) is owned by a user "james" who belongs to a group "sudo". Jenkins has its own user "jenkins" who I have since added to the group "sudo". As "jenkins" and "james" are both "sudo" members and the group has permission to write, I am unsure why this error would be occuring?
Adding a user to the group sudo does not make that user member of the same group as the one protecting the .git folder.
It just allows jenkins or james to be added to the sudoers, and executing commands (specified in said sudoers) as root.
You need to check which group is protecting .git, or if it is the root group, modify the jenkins script in order to sudo git pull origin master.
The OP James Howell confirms in the comments:
I ended up changing the group owner of the directory to "jenkins" of which the jenkins user is already a member.

Resources