如何解决当我尝试将文件添加到我的仓库中时,Git抛出readlink错误
大家晚上好 当我尝试向git repo添加文件时,出现错误。我已经运行了git init。我确实将存储库克隆到文件系统中,然后删除了遥控器。我的目标是我只是想将服务器的文件添加到github上的其他仓库中。任何指导将不胜感激。谢谢您的时间。
root@portfolio-test:/# sudo git add .
error: readlink("proc/10/exe"): No such file or directory
error: unable to index file 'proc/10/exe'
fatal: adding files failed
解决方法
我确实将存储库克隆到文件系统中,然后删除了远程
首先,请确保以普通用户身份将rpeository not 克隆为root。
然后,您应该转到(cd / path / to)该存储库文件夹,然后执行以下操作:
import boto3
def lambda_handler(event,context):
s3 = boto3.client('s3')
response = s3.list_buckets()
print('Existing buckets:')
for bucket in response['Buckets']:
for obj in bucket.object.all(['bucket']):
response = obj.get(
Key,StorageClass,Size)
print(response)
现在,您正尝试从系统的根文件夹/进行git add。
这将不起作用,因为文件太多,包括无法添加的系统文件。
- 不要以root身份工作
- 在克隆的存储库文件夹中工作,而不是/。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。