简体   繁体   English

使用git和MAMP进行本地开发的权限

[英]Permissions for local development with git and MAMP

I'm setting up a new machine on a clean account. 我正在使用干净帐户设置一台新计算机。 I'm developing locally on a Mac (OSX 10.8.2) with MAMP Pro and I use git for version control. 我正在使用MAMP Pro在Mac(OSX 10.8.2)上进行本地开发,并且使用git进行版本控制。 I'm having a permissions problem... 我遇到权限问题...

MAMP Pro allows you to set permission to the host directory using the following dialog: MAMP Pro允许您使用以下对话框设置对主机目录的权限: 在此处输入图片说明

When I set the owner to myself (ESL) and the group to "Admin" git works happily, but Wordpress updates on my local machine aren't able to run normally (I get prompted for ftp credentials). 当我将所有者设置为我自己(ESL)并将组设置为“管理员”时,git可以正常工作,但是本地计算机上的Wordpress更新无法正常运行(提示输入ftp凭据)。

When I set the owner and group to "www", Wordpress updates smoothly, but git throws "Permission denied" errors such as: 当我将所有者和组设置为“ www”时,Wordpress会平稳更新,但是git会抛出“权限被拒绝”错误,例如:

ESL$ git checkout master
fatal: Unable to create '/Applications/MAMP/htdocs/streetofwalls/.git/index.lock': Permission denied

I'm stuck because I need Wordpress to run normally as well as git. 我陷入困境是因为我需要Wordpress和git正常运行。 Any ideas why I'm having this problem and/or how to fix it? 任何想法为什么我有这个问题和/或如何解决它?

Allow everybody to write there. 让大家在那儿写。 It's just local dev machine, right? 这只是本地开发机器,对吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM