wget URL is forbidden, 403 error

refer to http://www.linuxquestions.org/questions/linux-software-2/wget-error-403-can-i-get-around-this-606755/

 

solution 1:

 

wget -U firefox http://xxx.xxx.com/

 

solution 2:

 

1) using firefox and command netcat to check the header,

 

2) wget -U xxx your.URL

 

If this is a problem related only to wget , but not other browsers, you may be able to spoof the site by using the wget '-U' option, giving it a user-agent description of another browser.

Code:
wget -U 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.6) Gecko/20070802 SeaMonkey/1.1.4' http://yourURL.com

To see what a working browser sends as a user-agent header, you can run netcat on your localhost, and have a browser try to fetch a page from it:

Code:
nc -l -p 8000 -v

Now, in your browser, go to 'http://localhost:8000'. Observe the user-agent header received by netcat . Cut and paste the string into the wget -U argument.

 

Error from server (Forbidden): error when retrieving current configuration of: Resource: "policy/v1, Resource=poddisruptionbudgets", GroupVersionKind: "policy/v1, Kind=PodDisruptionBudget" Name: "calico-kube-controllers", Namespace: "kube-system" from server for: "calico.yaml": poddisruptionbudgets.policy "calico-kube-controllers" is forbidden: User "system:node:master" cannot get resource "poddisruptionbudgets" in API group "policy" in the namespace "kube-system" Error from server (Forbidden): error when retrieving current configuration of: Resource: "/v1, Resource=serviceaccounts", GroupVersionKind: "/v1, Kind=ServiceAccount" Name: "calico-kube-controllers", Namespace: "kube-system" from server for: "calico.yaml": serviceaccounts "calico-kube-controllers" is forbidden: User "system:node:master" cannot get resource "serviceaccounts" in API group "" in the namespace "kube-system": can only create tokens for individual service accounts Error from server (Forbidden): error when retrieving current configuration of: Resource: "/v1, Resource=serviceaccounts", GroupVersionKind: "/v1, Kind=ServiceAccount" Name: "calico-node", Namespace: "kube-system" from server for: "calico.yaml": serviceaccounts "calico-node" is forbidden: User "system:node:master" cannot get resource "serviceaccounts" in API group "" in the namespace "kube-system": can only create tokens for individual service accounts Error from server (Forbidden): error when retrieving current configuration of: Resource: "/v1, Resource=configmaps", GroupVersionKind: "/v1, Kind=ConfigMap" Name: "calico-config", Namespace: "kube-system" from server for: "calico.yaml": configmaps "calico-config" is forbidden: User "system:node:master" cannot get resource "configmaps" in API group "" in the namespace "kube-system": no relationship found between node 'master' and this object Error from server (Forbidden): error when retrieving current configuration of: Resource: "apiextensions.k8s.io/v1, Resource=customresourcedefinitions", GroupVersionKind: "apiextensions.k8s.io/v1, Kind=CustomResourceDefinition" Name: "bgpconfigurations.crd.projectcalico.org", Namespace: ""
05-12
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值