Comments (11)
@hyacinthus 可以试试下面的办法:
- cos 应该有内网域名,你发个工单问一下,然后直接用内网域名就好
- 如果要用外网地址并且出现了证书问题的话,可以发工单问一下官方人员(推荐,他们的工单会有开发人员联系你),或者通过设置
AuthorizationTransport.Transport
来配置证书相关的配置:https://stackoverflow.com/questions/12122159/how-to-do-a-https-request-with-bad-certificate
from go-cos.
好的,谢谢,我发工单吧。完了可以考虑把官方的回复放readme里,毕竟后端库多半是内网访问的需求。。。
from go-cos.
结果腾讯云新鲜出炉了一个 cos golang sdk
我看他们大量参考了这个库呢
不过算是把没实现的补齐了
https://github.com/tencentyun/cos-go-sdk-v5
from go-cos.
@hyacinthus 他们的版本没有这个证书问题?如果他们的版本没有的话,我在 README 里添加一下这个问题。
from go-cos.
我还没抽出空来切,我现在去切换试下。
from go-cos.
哎 被骗了,他们的也报……
我还把工单关了,再开一个去。
from go-cos.
mozillazg,我看cos最近出的go sdk和你这个很像,你是在腾讯工作吗
from go-cos.
@yaoxingshuai 没,我没在腾讯工作。
from go-cos.
腾讯直接抄了代码,MIT协议里署名也没有了...
from go-cos.
@solarhell 有呀:https://github.com/tencentyun/cos-go-sdk-v5/blob/master/LICENSE#L3
from go-cos.
不好意思,经过一番折腾,想起来我遇到过这个坑。
虽然走的内网但是cvm是能连外网的,应该是能验证签名的呀。
于是想起来 debian 的裸镜像是没预装证书的。
需要在 dockerfile 里自己装 ca-certificates 这个包。
...
FROM debian
RUN apt-get update \
&& apt-get install -y -q --no-install-recommends \
ca-certificates \
&& apt-get clean \
&& rm -r /var/lib/apt/lists/*
ENV TZ=Asia/Shanghai
COPY --from=build-env /app/app /usr/bin/app
CMD ["app"]
在 debian 只要访问 HTTPS 就要装这个证书……
from go-cos.
Related Issues (9)
- Is there any way to point the specific ip and port for client? HOT 4
- Object 相关 API 支持设置 version id
- 上传失败 unsupported protocol scheme "”
- 临时密钥的过期时间如何设置? HOT 2
- Message: The Signature you specified is invalid. HOT 6
- not close body seems lead to leak HOT 2
- 请问有生成COS临时密钥的方法吗 HOT 4
- 上传文件不需要提供 Content-Length 疑问 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-cos.