小编The*_*ese的帖子

go get 似乎忽略了 gitconfig

寻求一些帮助。我有一个托管在远程 gitlab 实例上的私有存储库,我应该能够访问它。但无论我尝试什么,go get似乎都在尝试使用 https 而不是 SSH。我可以git clone,,git fetch没有etc任何问题。但我一使用go get,就失败了。

我做的第一件事就是添加这个: git config --global --add url."git@git.mydomain.io:".insteadOf "https://git.mydomain.io/"

然后我 cd 到我的项目目录并运行 go get,但尝试通过 HTTPS 进行身份验证失败,并显示“致命:无法读取“https://git.my.domain”的用户名:终端提示已禁用”:

PS C:\Users\User\go\src\git.my.domain\ps\wk\collector> go get            
go: downloading git.my.domain/ps/mqtt v0.0.0-20220903204713-6f195510d46e
go: git.my.domain/ps/mqtt@v0.0.0-20220903204713-6f195510d46e: verifying module: git.my.domain/ps/mqtt@v0.0.0-20220903204713-6f195510d46e: reading https://sum.golang.orglookup/git.my.domain/ps/mqtt@v0.0.0-20220903204713-6f195510d46e: 404 Not Found
        server response:
        not found: git.my.domain/ps/mqtt@v0.0.0-20220903204713-6f195510d46e: invalid version: git ls-remote -q origin in /tmp/gopath/pkg/mod/cache/v
cs/3a728c5d3b6137ea441372540f3e7bc1390c001346a70d5b7df3eda6d5e7316d: exit status 128:
                fatal: could not read Username for 'https://git.my.domain': terminal prompts disabled
        Confirm …
Run Code Online (Sandbox Code Playgroud)

git go gitlab

5
推荐指数
1
解决办法
613
查看次数

CMakeLists - 如何包含源文件和头文件的目录?

我觉得这个问题已经被问过很多次了,但我找到的答案似乎都不适合我。我对 CMake 和 C/C++ 非常陌生,因为我来自 Java 世界,并且正在努力理解 cmake 及其工作原理。

无论如何,基本上我有下面的文件夹结构。这是一个 esp-idf 项目,所以我不知道这是否与我遇到的问题有关。

main
-CMakeLists.txt
-main.cpp
-wifi.cpp
Metriful
-CMakeLists.txt
-Metriful_sensor.cpp
-Metriful_sensor.h
-Wifi_functions.h
-Wifi_functions.cpp
CMakeLists.txt
Makefile
Run Code Online (Sandbox Code Playgroud)

现在,我想做的就是包含 Metriful 子目录,这样我就可以使用“库”提供的功能。现在根目录中的 CMakeLists.txt 如下所示:

cmake_minimum_required(VERSION 3.5)

include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(ESP_32_WROOM32_SENSOR_-_Metriful)

include_directories("Metriful")
Run Code Online (Sandbox Code Playgroud)

这似乎不起作用,因为在我的 main.cpp 中包含“Metriful_sensor.h”仍然失败:

cmake -G Ninja .. <

-- ccache will be used for faster recompilation
-- Building ESP-IDF components for target esp32
-- Project sdkconfig file C:/Users/User/PlatformIO/ESP32_WROOM32_Sensor_-_Metriful/sdkconfig
-- Could NOT find Perl (missing: PERL_EXECUTABLE) 
CMake Warning (dev) at C:/Users/User/esp/esp-idf/components/mbedtls/CMakeLists.txt:114 (target_sources):
  Policy CMP0076 is not set: …
Run Code Online (Sandbox Code Playgroud)

c++ cmake esp32 esp-idf

3
推荐指数
1
解决办法
9291
查看次数

标签 统计

c++ ×1

cmake ×1

esp-idf ×1

esp32 ×1

git ×1

gitlab ×1

go ×1