smartwalle / alipay

支付宝 AliPay SDK for Go, 集成简单,功能完善,持续更新,支持公钥证书和普通公钥进行签名和验签,支持文件上传和接口内容加密。
MIT License
1.85k stars 417 forks source link

crypto4go库丢失 #206

Closed mryee2023 closed 2 months ago

mryee2023 commented 2 months ago
 go get github.com/smartwalle/alipay/v3
go: github.com/smartwalle/crypto4go@v1.0.2: reading github.com/smartwalle/crypto4go/go.mod at revision v1.0.2: git ls-remote -q origin in /Users/yibin/.gvm/pkgsets/go1.22.0/global/pkg/mod/cache/vcs/a4498b2a16c4dc0e00cad9700a68382d951b801e34acd2d115a4c04a06cf62e1: exit status 128:
    ERROR: Repository not found.
    fatal: Could not read from remote repository.

    Please make sure you have the correct access rights
    and the repository exists.
smartwalle commented 2 months ago

试试 go get github.com/smartwalle/alipay/v3@latest 或者 go get github.com/smartwalle/alipay/v3@v3.2.21

juxiaoming commented 2 months ago

遇到了同样的问题:go get github.com/smartwalle/alipay/v3@v3.2.21 go: github.com/smartwalle/crypto4go@v1.0.2: reading github.com/smartwalle/crypto4go/go.mod at revision v1.0.2: git ls-remote -q origin in C:\Users\dell\go\pkg\mod\cache\vcs\a4498b2a16c4dc0e00cad9700a68382d951b801e34acd2d115a4c04 a06cf62e1: exit status 128: fatal: Cannot prompt because user interactivity has been disabled. fatal: could not read Username for 'https://github.com': terminal prompts disabled Confirm the import path was entered correctly. If this is a private repository, see https://golang.org/doc/faq#git_https for additional information.

smartwalle commented 2 months ago

你们有没有用 mod,crypto4go 这个是很久很久以前的事情,怎么突然冒出这个问题来了。

wpxun commented 2 months ago

同样的问题,crypto4go 删除了,不能再引用了

juxiaoming commented 2 months ago

同样的问题,crypto4go 删除了,不能再引用了

看了一下这个支付包的引用v3.2.1之后go.mod就不再引用crypto4go这个包了,升级一下包版本到3.2.1之后就可以了,不过至于升级之后有什么版本问题,我还没测试

mryee2023 commented 2 months ago

你们有没有用 mod,crypto4go 这个是很久很久以前的事情,怎么突然冒出这个问题来了。

gomod 肯定是用了,因为很早之前引用的,换了一套CI环境后需要重新下载依赖,就发现了这个问题。

升级新版本固然也可以,但是方法不兼容了。以前的DoRequest变成了私有方法,Param接口多出来三个方法要实现。

mryee2023 commented 2 months ago

同样的问题,crypto4go 删除了,不能再引用了

看了一下这个支付包的引用v3.2.1之后go.mod就不再引用crypto4go这个包了,升级一下包版本到3.2.1之后就可以了,不过至于升级之后有什么版本问题,我还没测试

方法不兼容了,需要调整方法名,同时还需要实现Param多出来的三个method

smartwalle commented 2 months ago

你们有没有用 mod,crypto4go 这个是很久很久以前的事情,怎么突然冒出这个问题来了。

gomod 肯定是用了,因为很早之前引用的,换了一套CI环境后需要重新下载依赖,就发现了这个问题。

升级新版本固然也可以,但是方法不兼容了。以前的DoRequest变成了私有方法,Param接口多出来三个方法要实现。

https://github.com/smartwalle/alipay?tab=readme-ov-file#%E8%87%AA%E5%AE%9A%E4%B9%89%E8%AF%B7%E6%B1%82 参考这个呢,调整一下不复杂的。

mryee2023 commented 2 months ago

你们有没有用 mod,crypto4go 这个是很久很久以前的事情,怎么突然冒出这个问题来了。

gomod 肯定是用了,因为很早之前引用的,换了一套CI环境后需要重新下载依赖,就发现了这个问题。 升级新版本固然也可以,但是方法不兼容了。以前的DoRequest变成了私有方法,Param接口多出来三个方法要实现。

https://github.com/smartwalle/alipay?tab=readme-ov-file#%E8%87%AA%E5%AE%9A%E4%B9%89%E8%AF%B7%E6%B1%82 参考这个呢,调整一下不复杂的。

当然没问题,就是要花额外的时间去做UT的覆盖率了 :)