Permission error when logging into Heroku from command line - bash

When I try to login with
$heroku login
I am sent to the browser to log in, but upon return I receive this error:
heroku: Waiting for login...
Logging in... done
Error: EPERM: operation not permitted, open 'C:/Users/<My User>/_netrc'
I tried opening that file and I saw the password was incorrect so I changed it on heroku and in the file. Still have the error. I wonder if it is saying that it doesn't have permission to open that file?

Find the _netrc file. Open settings and toggle readonly to on, save, then turn off.

Related

Heroku cannot open browser to log in

I tried to log into Heroku via my command prompt by typing heroku login but this happened:
It says it cannot open my browser to log in. How should I proceed?
This just means that the Heroku CLI is having trouble opening the URL shown in your terminal for you.
Copy that URL and paste it into a browser of your choice, then log in.

How do I read from a folder in the user's home directory from an Xcode Source Editor Extension?

I created an Xcode Source Editor Extension. I'd like to build a linting command, for example. The user's existing lint file is located in a location like /Users/Tim/CalculatorApp/swiftlint.yml.
If I try to use try! String(contentsOfFile: "/Users/Tim/CalculatorApp/swiftlint.yml"), I get the error:
Fatal error: 'try!' expression unexpectedly raised an error: Error Domain=NSCocoaErrorDomain Code=257 "The file “.swiftlint.yml” couldn’t be opened because you don’t have permission to view it."
This is most likely because the extension is running in a sandbox and doesn't have permission to read files under the user's home directory. I tried removing the sandbox from the Extension's target, but then the extension doesn't load at all.
I get the error:
Could not attach to pid : “3623”
attach failed (Not allowed to attach to process. Look in the console messages (Console.app), near the debugserver entries when the attached failed. The subsystem that denied the attach permission will likely have logged an informative message about why it was denied.)
If I re-add the App Sandbox, clean the project, then run again, I no longer get this error. This leads me to believe that Xcode Extensions might need to be run in App Sandbox mode.
Is there a way to run an Xcode Extension without App Sandbox mode?
Are there any other workarounds for how to allow the Xcode extension to read the file in question? I was thinking about using the "User Selected File" permission, but I don't see how that would work with an Extension which has no UI.
Any other thoughts for how to get something like this to work?

Heroku login error on Ubuntu 16.04

Unable to login heroku via terminal after recently installing CLI:
TypeError: Cannot read property 'body' of undefined
at new HerokuAPIError (/usr/local/lib/heroku/node_modules/#heroku-cli/command/lib/api_client.js:12:33)
at Login.login (/usr/local/lib/heroku/node_modules/#heroku-cli/command/lib/login.js:78:19)
tried moving the netrc file, got a message stating it doesn't exist:
mv: cannot stat '/home/rodney/.netrc': No such file or directory
The same mistake occurred to me. The solution I found to be able to login was to write my email in a text file, then copy and paste the moment the email is requested before the error occurs, because in my case the error occurs after running the heroku login at the moment when I am typing the email.

Permission denied issue in Laravel 5.1

PHP Fatal error in laravel 5.1:
Uncaught exception 'UnexpectedValueException' with message 'The stream
or file "/var/www/html/SocialNet/storage/logs/laravel.log" could not
be opened: failed to open stream: Permission denied' in
/var/www/html/SocialNet/bootstrap/cache/compiled.php:13090\nStack
trace:\n#0 /var/www/html/SocialNet/bootstrap/cache/compiled.php(13030)
This is a log file permissions problem.
Some of the possible solutions:
give write permissions to that file
change the log file path to another you can write to
change the log output driver
disable logging
How to configure log
How to deal with log file path and permissions

Why do I get a 401 error in git when pushing changes to github?

I get the following error when trying to push changes to github from the cygwin command promt on windows xp.
$ git push
Password: [my-password-here]
error: The requested URL returned error: 401 while accessing https://[username]:github.com/[username]/[repository-location]/info/refs
fatal: HTTP request failed
Searches from google seemed to point at changing the path to the certificate file on windows, which i had already done in order to clone the repository.
Turns out that my password is quite secure and contains the '£' symbol. To get this on my keyboard it's Shift+3 when typing my password into the command prompt it was producing a '#' symbol. My keyboard settings are correct I'm guessing this issue is due to the cygwin window.
My solution was to change my github password so it doesn't contain this character

Resources